How can I programmatically cancel an outlook meeting with asp.net VB?

后端 未结 2 875
难免孤独
难免孤独 2021-01-06 06:03

I can programmatically create a meeting request that is sent to the user through code and appears in Outlook mail where the user can accept the request and if accepted the a

相关标签:
2条回答
  • 2021-01-06 06:40

    ANSWERED

    To cancel the meeting and have it removed from the outlook calendar you need to change the Method from "REQUEST" to "CANCEL" for the event that sends the cancellation request.

    msg.Body = strBody.ToString()
    
    Dim str As New StringBuilder()
    str.AppendLine("BEGIN:VCALENDAR")
    
    'PRODID: identifier for the product that created the Calendar object
    str.AppendLine("PRODID:-//CARS//Outlook MIMEDIR//EN")
    str.AppendLine("VERSION:2.0")
    '''ORIGINAL-CHANGE TO CANCEL'''
    'str.AppendLine("METHOD:REQUEST")
    '''NEW - CHANGE TO CANCEL'''
    str.AppendLine("METHOD:CANCEL")
    '''Everything else remains the same. Will work and remove meeting from calendar.'''
    
    0 讨论(0)
  • 2021-01-06 06:46

    Currently i am using this code to send meeting to outlook..

    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";

    And it is working fine..

    How can i use the same code to cancel / remove appointment from outlook.

    0 讨论(0)
提交回复
热议问题