Auto-accept meeting cancelation

U

Uriah65

Hi,

I developed an add-in to Outlook 2007 that automatically accepts meetings of
the certain type. However, I am cannot figure out how automatically accept
meeting cancelations. When cancelation arrives, I can intercept it in my
add-in but I am not sure what method to call to accept it and remove from my
calendar. Each time I have to go to my inbox and click ‘Remove from Calendar’
button manually.
How can I do it from code?
Thanks.

if (meeting.MessageClass == "IPM.Schedule.Meeting.Request")
{

// auto-respond
appointment.Respond(Microsoft.Office.Interop.Outlook.OlMeetingResponse.olMeetingAccepted, true, Type.Missing);

// move to delete folder
Outlook.Folder delete =
Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefau
ltFolders.olFolderDeletedItems) as Outlook.Folder;
meeting.Move(delete); }
else if (meeting.MessageClass == "IPM.Schedule.Meeting.Canceled")
{
// ????
// how to auto respond and remove from calendar

}
 
U

Uriah65

Sorry, I have found an answer myfelf. That works fine.

appointment.MeetingStatus =
Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeetingCanceled;
olMeetingCanceled
meeting.Delete();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top