문제

I am exporting all the e-mails from folder and sub-folder of exchange server, i am able to get all the folder and its mails using the link, (answer ofono2012)

How To Get all ITEMS from Folders and Sub-folders of PublicFolders Using EWS Managed API

but i am not able to get, which folder was whose sub-folder, means not able to get folder hierarchy

please help

도움이 되었습니까?

해결책

You'll have to do a separate FindFolder operation to get the folder hierarchy:

http://msdn.microsoft.com/en-us/library/office/dd633627(v=exchg.80).aspx

Make sure to include view.Traversal = FolderTraversal.Deep; and do

view.PropertySet = new PropertySet(BasePropertySet.IdOnly);
view.PropertySet.Add(FolderSchema.DisplayName);
view.PropertySet.Add(FolderSchema.ParentFolderId);

to get the full hierarchy of relationships. You should then be able to match the ParentFolderId from the items to the folder ids.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top