In a VSTO add-in, I am trying to retrieve if the type of the mailbox is shared, user or resource.
I read some interesting posts related to the question and try to look at the OlExchangeStoreType or GetConversation or MailboxType but did not succeed.
I have seen the solution (3) from @DmitryStreblechenko but I would prefer to not use EWS if possible.
It seems that the value that I am looking for is the msExchRecipientTypeDetails.
Any help would be highly appreciated.
Relevant articles
-
EWS Get mailbox type (user/resource/shared)
-
MailItem.GetConversation() on shared mailbox
-
In Outlook Addin, how do I determine if an email's Sender is a shared mailbox email address?
-
https://www.codeproject.com/Questions/1088741/How-to-list-subfolders-in-inbox-folder-in-shared-e
-
https://learn.microsoft.com/en-us/answers/questions/612248/in-outlook-addin-how-do-i-determine-that-an-email.html
发布评论
评论(2)
首先,VSTO并没有为此提供任何东西。
其次,Outlook对象模型没有区分共享/本地商店。因此,您将在OOM中找不到任何属性或方法。最好的办法是使用 store。 ExchangestoreType 属性返回 olexchangeStype指示交换商店类型的枚举。
由您决定哪种方式/解决方法是使用上面共享的列表。
First of all, VSTO doesn't provide anything for that.
Second, the Outlook object model doesn't differentiate shared/local stores. So, you will not find any property or method for that in the OOM. The best what you could do is to use the Store.ExchangeStoreType property which returns a constant in the OlExchangeStoreType enumeration that indicates the type of an Exchange store.
It is up to you which way/workaround is to use form the list shared above.
您无需使用EWS-尝试读取
namespace.autodiscoverxml
属性以检查共享邮箱及其类型是否存在 - 您可以在查找
externativemailbox \ type
节点 - 您可以具有“存档”,“委托”,“ TeamMailbox”。You don't need to use EWS - try to read
Namespace.AutoDiscoverXml
property to check if the shared mailbox and its type are there - you can see it in OutlookSpy (I am its author): click Namespace button, select AutoDiscoverXml property.Look for the
AlternativeMailbox\Type
nodes - you can have "Archive", "Delegate", "TeamMailbox".