macro needs info on currently highlighted message in search folder

T

tbone

I created a search folder, "Messages Sent Or Received Prior To 2008)
by using the Advanced Search and creating a query. The list of
messages is shown, including just the lowest level folder name.

I can navigate through the messages, and I'd like write a macro to
show the full folder path of the currently selected (not opened)
message, because I have many dozens of folders and they're not all
named uniquely at the lowest level.

Can this be done?

Thanks
tbone
 
T

tbone

Oops...

Show it where? Outlook version?

I'm using Outlook 2003. I'd like to just pop up the full path of the
parent folder in a msgbox.

BTW, love the book! It inspired me to be a programmin' fool the last
few days. I've done a lot of VBA in Excel but hardly any in Outlook
until now.

Thx
tbone
 
S

Sue Mosher [MVP]

I don't have your earlier post. (Please, please quote earlier posts so
people using newsreader software can follow the conversation.) But if I
remember correctly, you'd use something like this:

MsgBox Application.ActiveExplorer.Selection(1).FolderPath

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
 
T

tbone

I don't have your earlier post. (Please, please quote earlier posts so
people using newsreader software can follow the conversation.) But if I
remember correctly, you'd use something like this:

MsgBox Application.ActiveExplorer.Selection(1).FolderPath

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

Sue,

1. Thanks very much for continuing to visit the group; I'm glad to see
you're still willing to spend time with Outlook.

2. I'm so used to using Agent, which saves and threads everything for
me, that I didn't recognize that some people might not always have the
prior messages available. I will do the "quote and <snip>" thing in
the future (because I really think having to scroll down 400 lines to
see replies is a lot worse than top-posting).

3. For some reason, I didn't see the Outlook VBA group on my news
server originally. Thanks for pointing that out; I refreshed and am
now subscribed to a few more Outlook groups.

4. Your memory serves you very well. Not only was that exactly what I
was looking for, but your solution works perfectly!

Thank you very much!
tbone
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top