none
Programmatically adding event to Outlook Calendar RRS feed

  • Question

  • I'm trying create a scenario where a user can add an event to a calendar list in Sharepoint 2010 and automatically have that event emailed to that user as a calendar event in Outlook. I can send a meeting request to the user that creates the calendar list item by constructing and emailing an iCal view. But if I try to make the user the event organizer (which they should be), the user gets a message saying that it can't find the appointment in their calendar.

    The following creates a meeting request:

    dim vents as string = "BEGIN:VCALENDAR  VERSION:2.0  METHOD:PUBLISH  BEGIN:VEVENT  UID:92c540a0-00ca-48d9-96e6-cc014021fc95  SUMMARY:  LOCATION:Training Room  DTSTART:20100616T020000Z  DTEND:20100616T020000Z  DTSTAMP:20100616T015621Z  DESCRIPTION:Test  URL:www.test.com.au  END:VEVENT  END:VCALENDAR"

    System.Net.Mail.AlternateView.CreateAlternateViewFromString(vents.ToString, New Net.Mime.ContentType("text/calendar"))

     

    However, the following (which includes the user as the event organizer) sends the email, identifying the user as the organizer, but states in the email that 'Meeting cannot be found in the calendar'.

    {BEGIN:VCALENDAR  VERSION:2.0  METHOD:PUBLISH  BEGIN:VEVENT  UID:843e2c81-c9ba-4f65-b6c5-274e801410e9  SUMMARY:  ORGANIZER:mailto:user@example.com.au  LOCATION:Training Room  DTSTART:20100616T030000Z  DTEND:20100616T030000Z  DTSTAMP:20100616T020142Z  DESCRIPTION:Test  URL:www.test.com.au  END:VEVENT  END:VCALENDAR  } 

    System.Net.Mail.AlternateView.CreateAlternateViewFromString(vents.ToString, New Net.Mime.ContentType("text/calendar"))

    How do I get it to create the event/appointment in the organizer's calendar? I thought that using Method:PUBLISH was supposed to achieve this.

    Regards

     
    Thursday, June 17, 2010 11:38 PM

Answers

  • Hi ibeme99,

    Building iCal yourself is not supported. I would recommend that you use another strategy for adding the calendar items to the users calendars. For example, you may make use of the Exchange Web Services Managed API if your users are on Exchange 2007/2010. Another option may be to have your users connect to the SharePoint calendar directly in Outlook using the "Connect To Outlook" action in SharePoint.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Patrick
    Microsoft Online Community Support

    Monday, June 21, 2010 1:40 PM
    Moderator