none
Calendar Overlay Outlook 2010 vs Outlook 2013 RRS feed

  • Question

  • I developed an Outlook 2010 add-in that allows a user to click a button and in that button it attempts to create a calendar overlay, it works great in Outlook 2010 however the same code in Outlook 2013 fails

    The only error that I get is: The Operation failed.

    This is my original code:

    Outlook.Application ouApplication = new Outlook.Application();
    Outlook.Folder newFolder = ouApplication.GetNamespace("MAPI").OpenSharedFolder(calUrl) as Outlook.Folder;

    I tried this code this morning and I get the same error

    Outlook.Folder newFolder = ouApplication.Session.OpenSharedFolder(calUrl, Type.Missing, Type.Missing, Type.Missing) as Outlook.Folder;

    calUrl is the URL that we are attempting to add to Outlook as a secondary calendar.

    What needs to be done to get this to work in Outlook 2013?

    Thursday, February 5, 2015 4:34 PM

Answers

  • I think I just found the cause of the error and it is not code.

    Internet Calendar Subscriptions has been turned off by our Administrator.

    Thank you Eugene for your help!

    • Marked as answer by niyack Thursday, February 5, 2015 7:24 PM
    Thursday, February 5, 2015 7:24 PM

All replies

  • Hello,

    What is the actual value passed to the OpenSharedFolder method?

    MSDN states the following:

    This method is used to access the following shared folder types:

    • Webcal calendars (webcal://mysite/mycalendar)
    • RSS feeds (feed://mysite/myfeed)
    • Microsoft SharePoint Foundation folders (stssync://mysite/myfolder)
    • iCalendar calendar (.ics) files
    • vCard contact (.vcf) files
    • Outlook message (.msg) files

    This method does not support iCalendar appointment (.ics) files. To open iCalendar appointment files, you can use theOpenSharedItem method of the NameSpace object.

    Be aware, you can use the GetSharedDefaultFolder method of the Namespace object to share default folders, such as the Inbox folder, in Exchange. Have you tried to use it instead?

    Thursday, February 5, 2015 4:47 PM
  • forgive my lack of detail, I did not write the code to this part of the add-in.

    It is a webcal

    • Webcal calendars (webcal://mysite/mycalendar)

    do you think the issue that I am having has anything to do with the Microsoft.Office.Interop.Outlook.dll?

    the version that I am using now is 14, should it be 15?

    Thursday, February 5, 2015 6:39 PM
  • I just changed out the Microsoft.Office.Interop.Outlook.dll from version 14 to 15 and I still get the same error:

    The Operation failed

    Thursday, February 5, 2015 7:00 PM
  • I think I just found the cause of the error and it is not code.

    Internet Calendar Subscriptions has been turned off by our Administrator.

    Thank you Eugene for your help!

    • Marked as answer by niyack Thursday, February 5, 2015 7:24 PM
    Thursday, February 5, 2015 7:24 PM