none
Internet Calendar Subscriptions RRS feed

  • Question

  • Given a url, how can one create Internet Calendar Subscriptions in the Outlook client using C#?

    Thru an add-in process in C# I am given urls, from those urls I wish to create Internet Calendar Subscriptions to show in that users Outlook client.

    How do I do this in C#, please!!!!

    Wednesday, December 4, 2013 6:30 PM

Answers

All replies

  • Hello Nyack,

    Add-in Express doesn't provide any URLs.

    Please take a look at the "How to: Open and Display the Contents of an iCalendar File" article in MSDN. There also you can find a sample code in C#.

    Wednesday, December 4, 2013 7:24 PM
  • OK, that did not help at all, however I found one that worked:

    Folder newFolder = this._Application.GetNamespace("MAPI").OpenSharedFolder("<the .ics usl>") as Folder;

    Wednesday, December 4, 2013 7:45 PM
  • Hello Niyack,

    I am bit confused. The referenced article is exactly what you need, moreover it provides the following code:

    // If unsucessful in opening it as an item, 
        // try opening it as a folder
        Outlook.Folder importedFolder = null;
        try
        {
            importedFolder = Application.Session.OpenSharedFolder(
                fileName, Type.Missing, Type.Missing, Type.Missing) 
                as Outlook.Folder;
        }
        catch
        { }
    

    Did you try to run it?

    Thursday, December 5, 2013 7:42 AM