简体   繁体   中英

Check if Outlook MAPIFolder is visible?

When I iterate through all Outlook folders (in a C# Add-In) I see folder names like:

  • Yammer Root
  • Sync Issues
  • Subscriptions

These folders are not visible in Outlook. I like to check in my code if the folder is visible or not but I don't find a property like Hidden or Visible.

MAPIFolder folder has properties like:

  • folder.DefaultItemType
  • folder.Name

but not hidden.

How can I find out in my c# Add-In if folders are hidden or not?

You will need to read the PR_ATTR_HIDDEN MAPI property (DASL name http://schemas.microsoft.com/mapi/proptag/0x10F4000B ). You can read it using MAPIFolder.PropertyAccessor.GetProperty .

You can see that (and other) property using OutlookSpy (click IMAPIFolder button)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM