Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove outlook meeting request

Tags:

c#

outlook

I'm creating an application in C#. In this i can create a meeting request that is sent to the user through code and appears in Outlook mail.

The below code is what I am using to send the meeting invitation. It is working fine.

StringBuilder OutlookBody = new StringBuilder();
string textvs = @"BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN
VERSION:1.0
BEGIN:VEVENT
LOCATION:" + Location + @"
DTSTART:" + string.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", start) + @"
DTEND:" + string.Format("DTEND:{0:yyyyMMddTHHmmssZ}", end) + @"
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:= " + OutlookBody + @"=0D=0A SUMMARY:" + AppoitmentName + @"
PRIORITY:3
END:VEVENT
END:VCALENDAR";

How can i use the same code to remove outlook meeting request.

I have also checked this answer, but it didn't solve my problem.

like image 395
Deepak gupta Avatar asked Jan 25 '17 09:01

Deepak gupta


2 Answers

In OutLook every appointment/meeting will get a unique Id and a ChangeKey. A new ChangeKey is generated whenever there is a modification done to the meeting. To update an existing meeting you must have the Id and latest ChangeKey.

In your approach, if I am not wrong, you are just constructing an ICAL which is added to the outlook via email. In this case, you will not have the Id and ChangeKey to modify the meeting programatically. I would rather suggest you to change the approach.

If you have Microsoft Exchange the following links will guide. Else, ignore the links.

https://msdn.microsoft.com/en-us/library/office/dn495611(v=exchg.150).aspx https://msdn.microsoft.com/en-us/library/office/dn495612(v=exchg.150).aspx

like image 159
Rama Kathare Avatar answered Oct 06 '22 01:10

Rama Kathare


You can set the method and status of the meeting by adding these lines:

METHOD: CANCEL

STATUS: CANCELLED

See more here.

like image 31
jomsk1e Avatar answered Oct 06 '22 01:10

jomsk1e