From: VainDM on
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?
From: Tom van Stiphout on
On Wed, 19 May 2010 04:41:01 -0700, VainDM
<VainDM(a)discussions.microsoft.com> wrote:

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 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?
From: VainDM on
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


"Tom van Stiphout" wrote:

> On Wed, 19 May 2010 04:41:01 -0700, VainDM
> <VainDM(a)discussions.microsoft.com> wrote:
>
> 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 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?
> .
>
From: VainDM on
Also i am using Office 2007

"VainDM" wrote:

> 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?
 | 
Pages: 1
Prev: Actioning Icon
Next: Running tally on form