A
Andy
Hi,
I am simply trying to create an appointment, invite someone and send it. The
code below does most of this. It creates the appointment for 4 days time
between 08:00 and 09:00 I get promted that a program is trying to send an
item so click Yes (once the Yes button appears) but the appointment does not
get sent. It is created in the Calendar though. Any ideas?
SD = Date + 4
SD = DateAdd("h", 8, SD)
ED = DateAdd("h", 1, SD)
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI") ' open the MAPI Namespace
Set olFolder = olNS.GetDefaultFolder(olFolderCalendar)
Set objAppointment = olFolder.Items.Add
With objAppointment
.RequiredAttendees = "(e-mail address removed)"
.Subject = "Event"
.Start = SD
.End = ED
.Recipients.ResolveAll
If .Recipients.ResolveAll Then
.Send
.Close olSave
End If
End With
I am simply trying to create an appointment, invite someone and send it. The
code below does most of this. It creates the appointment for 4 days time
between 08:00 and 09:00 I get promted that a program is trying to send an
item so click Yes (once the Yes button appears) but the appointment does not
get sent. It is created in the Calendar though. Any ideas?
SD = Date + 4
SD = DateAdd("h", 8, SD)
ED = DateAdd("h", 1, SD)
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI") ' open the MAPI Namespace
Set olFolder = olNS.GetDefaultFolder(olFolderCalendar)
Set objAppointment = olFolder.Items.Add
With objAppointment
.RequiredAttendees = "(e-mail address removed)"
.Subject = "Event"
.Start = SD
.End = ED
.Recipients.ResolveAll
If .Recipients.ResolveAll Then
.Send
.Close olSave
End If
End With