Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook folder path 1

Status
Not open for further replies.

DugsDMan

Programmer
Mar 19, 2002
85
US
I'm trying to write a COM add-in for Outlook 2003 in VB.Net. I need figure out the full path to a selected email. Basically, if it's in the Inbox>Projects>Current Projects>Project 1 sub folder, I would like to be able to grab all that info. From there, I want to set a variable equal to "Inbox\Projects\Current Projects\Project 1".

Can someone point me in the right direction?

Thanks,
Doug
 
The selected email will be a MailItem object. Its Parent property will tell you which MAPIFolder object it lives in.

The FolderPath property of this object should give you what you want.


Bob Boffin
 
Thanks! I figured out a way to do it by stepping up each level until I got to the mailbox, but this is much cleaner...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top