General information
Category:
COM/DCOM and OLE Automation
Title:
Creating appointments on other users calendars in outlook
I am trying to create appointments and retrieve any conflicts on another user's Outlook Calendar. This seems to work fine on my Outlook 2000 system, but how do I send the appt to someone else and retrieve the Items from their calendar to check for conflicts?
I am using this code:
loOutlook=CREATEOBJECT('outlook.application')
loSpace=loOutlook.getnamespace('mapi')
loCalendar=loSpace.GetDefaultFolder(9)
* check for conflict
IF OUTLCONFLICT(ldDate,lcTime,lnDuration,lcLoginname)
* don't do anything, conflict found
ELSE
oAppt=loCalendar.Items.Add()
oAppt.Subject=lcSubject
oAppt.Body=lcBodytext
oAppt.Location=lcLocation
oAppt.Start=DTOC(ldDate)+' '+lcTime
oAppt.Duration=lnDuration
oRecipient=oAppt.Recipients.Add(lcLoginname)
oRecipient.Type=1
oRecipient.Resolve()
oAppt.MeetingStatus=1
oAppt.Send()
oAppt.Save()
ENDIF
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only