>Hello,
>
>hope somebody can help me. I'm searching for a solution to delete an appointment from a calendar in Outlook 2007.
>What is just working is to create an appointment (with inviting a resource).
>If somebody wants to change or delete the appointment I delete it in my Outlook Calendar. If I do this manually Outlook asks me if I want to send an "rejection" to the invited resource. In the resource-Calender I than can see that this appointment was cancelled.
>If I delete ist via VFP with :
>
>olFolderCalendar = 9
>oNameSpace = oOutlook.getnamespace('MAPI')
>oDefaultFolder=oNameSpace.GetDefaultFolder(olFolderCalendar)
>oItems = oDefaultFolder.items
>For ix = oItems.Count To 1 Step -1
> If delete
> lDelete = oItems.item(ix).delete
> endif
>NEXT ix
>
>the appointment is deleted in my calendar but not in the calendar of the resource. No message is sent to it.
>How can I delete the message from the resource calendar (I have access to it in Outlook) and how can I force Ourlook to send a "rejection" to the resource calendar.
>
>Thanks in advance
>
>Marcus
Hi,
You may try something like this:
FOR EACH oItem IN oNameSpace.GetDefaultFolder(olFolderCalendar).items
IF ....
oitem.display
oOutlook.ActiveInspector.CommandBars("Menu Bar").controls("Actions").Control.controls("Cancel Meeting").Execute
ENDIF
NEXT
Good Luck