Using Access to create an appointment and add attendees

  • Thread starter Thread starter VainDM
  • Start date Start date
V

VainDM

Hi i am using Access to create an appointment in outlook. I have the code
for creating the appointment but i am struggling to add attendees. This is
what i have so far;
DoCmd.RunCommand acCmdSaveRecord
Dim objOutlook As Outlook.Application
Dim objAppt As Outlook.AppointmentItem
Dim objRecurPattern As Outlook.RecurrencePattern
Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olAppointmentItem)
With objAppt
.Start = Est_Finish_Date
.Subject = Component
.End = Est_Finish_Date
.Body = Comments
If Comments = Null Then .Body = Null
.Categories = "Job"
.AllDayEvent = True
.Save
End With
Set objAppt = Nothing
Set objOutlook = Nothing
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Appointment Added!"
Exit Sub

can anyone help?
 
On Wed, 19 May 2010 04:41:01 -0700, VainDM

You're doing pretty good so far. Just above the "End With" line write:
..Recipients.Add("Person One")
..Recipients.Add("Person Two")
etc.


-Tom.
Microsoft Access MVP
 
Hi Tom

Thanks for your reply, i was looking for attendee's. Didn't think of looking
for recipients.
Now the process goes through without an error, however neither of the
recipients have received the appointment.

Any Ideas

Thanks
 
Back
Top