开发者

Outlook ContactItem: get containing folder?

开发者 https://www.devze.com 2023-04-02 02:00 出处:网络
I am maintaining an Outlook add in that manages Outlook contacts.I have a function that g开发者_如何学Goets all the contacts in a folder and its subfolders.Now, I need to determine which folder a give

I am maintaining an Outlook add in that manages Outlook contacts. I have a function that g开发者_如何学Goets all the contacts in a folder and its subfolders. Now, I need to determine which folder a given contact was retrieved from. Is this possible without scanning each of the folders or returning the paths along with each of the contact items?


This works for me:

public string GetFolderFullName(Outlook.ContactItem ci) {
    Outlook.MAPIFolder mf = ci.Parent;
    string path = mf.FolderPath;
    return path;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消