Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top