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.
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
You can set the method and status of the meeting by adding these lines:
METHOD: CANCEL
STATUS: CANCELLED
See more here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With