开发者

Get Mailbox name in Outlook Addin using VSTO

I'm working on开发者_开发问答 Outlook 2003 AddIn using VSTO.Is there a way to Get the Mailbox Name OR NTUserName of the user.


To Get the user name logged on via outlook use Application.NameSpace.CurrentUser

To get the Mailbox Name in 2007 use Store.DisplayName Property

(Edit) In Outlook 2003 you can get the parent of the Inbox folder and the name property should be what you want.

Set myNameSpace = myOlApp.GetNameSpace("MAPI")
Set myFolder= myNameSpace.GetDefaultFolder(olFolderInbox)
Set myParentFolder = myFolder.Parent

Marcus

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜