Reputation: 917
I am maintaining an Outlook add in that manages Outlook contacts. I have a function that gets 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?
Upvotes: 1
Views: 624
Reputation: 917
This works for me:
public string GetFolderFullName(Outlook.ContactItem ci) {
Outlook.MAPIFolder mf = ci.Parent;
string path = mf.FolderPath;
return path;
}
Upvotes: 2