.NET: Get all Outlook calendar items

前端 未结 11 1352
情书的邮戳
情书的邮戳 2020-12-02 09:41

How can I get all items from a specific calendar (for a specific date). Lets say for instance that I have a calendar with a recurring item every Monday evening. When I requ

11条回答
  •  天涯浪人
    2020-12-02 10:05

    If you need want to access the shared folder from your friend, then you can set your friend as the recipient. Requirement: his calendar must be shared first.

    // Set recepient
    Outlook.Recipient oRecip = (Outlook.Recipient)oNS.CreateRecipient("abc@yourmail.com");
    
    // Get calendar folder 
    Outlook.MAPIFolder oCalendar = oNS.GetSharedDefaultFolder(oRecip, Outlook.OlDefaultFolders.olFolderCalendar);
    

提交回复
热议问题