Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement