2
votes

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

1

1 Answers

4
votes

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