hi ,
all
i have some code that creates appointment that i can send to collegues
when i run the code first time it work all ok but the second time i run it i get a run time error see pic below
but i dont get any error's if i leave outlook open have also try the code on 2 pc's but stiill same problem
![1392336756_tmp_run_time_error[1].jpg 1392336756_tmp_run_time_error[1].jpg](https://accessprogrammers.b-cdn.net/forums/data/attachments/44/44398-24229b5a07cb6cbfca824992c8c63cc1.jpg?hash=JCKbWgfLbL)
here my code:
outMail.Display
can someone please point me in the right direction
thanks in advance
shane
all
i have some code that creates appointment that i can send to collegues
when i run the code first time it work all ok but the second time i run it i get a run time error see pic below
but i dont get any error's if i leave outlook open have also try the code on 2 pc's but stiill same problem
![1392336756_tmp_run_time_error[1].jpg 1392336756_tmp_run_time_error[1].jpg](https://accessprogrammers.b-cdn.net/forums/data/attachments/44/44398-24229b5a07cb6cbfca824992c8c63cc1.jpg?hash=JCKbWgfLbL)
here my code:
Code:
Shell ("Outlook.exe")
Dim outMail As Object
Set outMail = Outlook.CreateItem(olAppointmentItem)
outMail.Recipients.Add (Me.txtsupervisor)
outMail.RequiredAttendees = attendees ' name of attendees
outMail.Subject = Me.txtsubject ' subject of meeting
outMail.Location = Me.cbolocation ' location of meeting
outMail.MeetingStatus = olMeeting 'what type of appointment it is
outMail.start = Me.txtdatedue & " " & "10:00 AM" '[Date] & " " & [Time] 'fill in columns with date and time variables (or just put in default time such as "09:00")
outMail.Body = Me.txtbody 'text in main body
outMail.ReminderMinutesBeforeStart = 20
outMail.Display
can someone please point me in the right direction
thanks in advance
shane