Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public static Folder FindFolderByDisplayName(ExchangeService service, string name)
{
var folderView = new FolderView(100);
folderView.PropertySet = new PropertySet(BasePropertySet.IdOnly);
folderView.PropertySet.Add(FolderSchema.DisplayName);
folderView.Traversal = FolderTraversal.Deep;
FindFoldersResults findFolderResults = service.FindFolders(WellKnownFolderName.Root, folderView);
return findFolderResults
.Cast<Folder>()
.FirstOrDefault(folder => folder.DisplayName == name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.