Question

I am working on an outlook add-in for site mailboxes and I need to know the sharepoint URLs of the documents and folders in a site mailbox.

For items, that was easy: an item inside a site mailbox is a DocumentItem which has one attachment and the PathName of that attchment contains the url.

But have no idea, how to get the url of a Folder.

Does annyone have knowledge of how to get the sharepoint url of a folder?

Was it helpful?

Solution

After spending several hours of googling and decompiling, I found a solution:

    public void OnSiteMailBoxMenuClick(IRibbonControl control)
    {
        Folder folder = control.Context as Folder;
        if (folder != null)
        {
            string containerProp = folder.PropertyAccessor.GetProperty(@"http://schemas.microsoft.com/mapi/proptag/0x3613001E");
            if (containerProp == "IPF.ShortcutFolder")
            {
                string sharePointSite = folder.PropertyAccessor.GetProperty(@"http://schemas.microsoft.com/mapi/proptag/0x6647001E");
            }
        }
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top