macro needs info on currently highlighted message in search folder

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
0
tbone
11/13/2009 12:14:09 AM
outlook 87535 articles. 10 followers. Follow

4 Replies
777 Views

Similar Articles

[PageSpeed] 18

Show it where? Outlook version?

-- 
Sue Mosher, Outlook MVP
   Author of Microsoft Outlook 2007 Programming:
     Jumpstart for Power Users and Administrators
    http://www.outlookcode.com/article.aspx?id=54


"tbone" <noneedto@email.me> wrote in message 
news:4o8pf5tu3g4p2e0p85gb1ng991k23nmb8e@4ax.com...
>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 


0
Sue
11/13/2009 12:45:51 AM
Oops...

On Thu, 12 Nov 2009 19:45:51 -0500, "Sue Mosher [MVP]"
<suemvp@gmail.com> wrote:

>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
0
tbone
11/13/2009 1:08:23 AM
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 Mosher, Outlook MVP
   Author of Microsoft Outlook 2007 Programming:
     Jumpstart for Power Users and Administrators
    http://www.outlookcode.com/article.aspx?id=54


"tbone" <noneedto@email.me> wrote in message
news:j2cpf5heqohg678qlastvpof39kr0acirb@4ax.com...
> Oops...
>
> On Thu, 12 Nov 2009 19:45:51 -0500, "Sue Mosher [MVP]"
> <suemvp@gmail.com> wrote:
>
>>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



0
Sue
11/13/2009 3:03:13 AM
On Thu, 12 Nov 2009 22:03:13 -0500, "Sue Mosher [MVP]"
<suemvp@gmail.com> wrote:

>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
0
tbone
11/13/2009 7:51:53 PM
Reply:

Similar Artilces:

Need better way to provision AD accounts that are to have mailboxes
The exchange admins in my company have come up with a way for the sys admins to assign the user's mailbox store location. It's based off of last name. For example, if your last name starts with letter A, you go on Storage Group 1, Mailbox Store A, if your last name starts with letter B, you go on Storage Group 1, Mailbox Store B, if your last name starts with letter E, you go on Storage Group 2, Mailbox Store A, etc.... This is, I believe, and administrative nightmare. Is there a better way to provision AD accounts that are to have mailboxes? If it works for you and them, then al...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

Messages sitting on my gmail account, still can't download anything (MS Outlook 2003)
Recently I started using my gmail account both at work and at home with MS Outlook 2003. Home Outlook is the primary one, so at WORK I checked the "leave a copy on the server" option, and -as expected- messages still sit on my gmail account as I checked when I came home. Now trying to download these messages at home Outlook, I do a send/receive, but nothing gets downloaded !@#$! even though they show up on gmail. Any ideas ?? Once read, i.e. downloaded by one pc, the other will see it "as read" and will not download it. If you look at gmail the message will not be in...

need help with an excel spreadsheet
I have an excel spreadsheet where questions are answered in one area, and the answers show up on a form in another area of the sheet that gets printed. Instead of printing, how can I either email the print area or have just the print area saved as a file? And, with a macro, can the new file be named automatically by what's in a particular cell? Thanks, Russ You don't say whether the recipient would need to edit the data. If not, there are numerous programs available (free, shareware and commercial) which enable print output to be stored as a PDF file. Another option would be to c...

Conditional Formula
Hello, I would like some help in evaluating the value of a cell that falls within a certain range. For example: If A2 is less than 1 and greater than 10 "TRUE" Your help is appreciated. Ed Hi Eduardo do you mean if A2 is less than 1 OR greater than 10??? if so format / conditional formatting formula is =OR($A2<1,$A2>10) or if you mean greater than 1 and less than 10 =AND($B1>1,$B1<10) Cheers JulieD "Eduardo" <Eduardo@discussions.microsoft.com> wrote in message news:00BD63BC-81A8-41B9-86F0-BAE57246B86C@microsoft.com... > Hello, > I would li...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

Need to set extra hard return
Hi, This must be a very basic thing, but I have been asked to submit a paper with extra hard returns in Word. How do I do this? Can anyone help me out please? Thanks. Viju vijuhegde wrote: > This must be a very basic thing, but I have been asked to submit a > paper with extra hard returns in Word. How do I do this? Can anyone > help me out please? Ask whomever assigned this task to explain this task. Essentially a "hard return" signifies the end of a paragraph. It's simply pressing ENTER. The "soft return" is just a way to start a new line - h...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

Public Folder Store Present on Front-Ends
I ran the EXbpa and it said that it is recommended to dismount the Public folders stores on my front end severs. When I dismounted them mail started queueing up and did not start again until I mounted the stores. Why would this be when Microsoft recommends it and what does the PF store have to do with mail flow? I am running Exchange Server 2003 SP2 Tyson <Tyson@discussions.microsoft.com> wrote: >I ran the EXbpa and it said that it is recommended to dismount the Public >folders stores on my front end severs. When I dismounted them mail started >queueing up and did no...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

File In Use
I am trying to open an excel program that is shared on a network drive. When I go to open it the following message box pops up.... File In Use name.xls is locked for editing by 'user name'. open by 'read only' or click 'notify' to open read-only and receive notification when the document is no longer in use. The user name that it is saying is me and I don't have the file open. Does anyone know why it is saying this or how to fix it? I guess it thinks I have the file open, maybe it didn't close right but I can't figure it out. Thanks Dave ma...

"Action canceled" message when clicking on a link in HTML email
Hi, I have the following link in a HTML file that exists on my disk: <html> <body> <a href="http://someurl.com/some/DocumentDownload?doc=66">Document</a> </body> </html> Clicking on the Document link opens a Word Document just like you'd expect - nothing unusual. However, If I email this same HTML and click on the link in Microsoft Outlook the Word document opens, but an Internet Explorer window opens having the message: Action canceled Internet Explorer was unable to link to the Web page you requested. The page might be temporarily una...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

Generic message
Hi everybody, I would like to know how modify the genec error message ...

Macro Freezes Reading Pane
I have a macro that Sends/Receives Tasks from Project Server into Outlook Tasks. Everything is working fine, except one weird thing that happens. I have the Timer set on the macro and it starts as soon as Outlook starts. The macro gets the tasks from ProjectServer every hour. As soon as the macro starts running the Reading pane freezes in the Inbox. If i stop the macro then Reading pane is back to normal. Can anyone please tell me if there is something I can do in VBA to fix this annoying issue. Thanks a lot ...

Macro to remove rows?
Hi, I receive thousands of rows of data from an extract that comes from a database. The data extract automatically generates page headers that need to be removed, and I would love to automate this process. The headers do have a pattern to them, but I'm not clever enough to figure out a good way to use that to write a macro. The first row of the header starts with hyphens ------------------------------- Then there's a variable number of rows of header data to delete followed by another row of hyphens ------------------------------- Then 2 additional rows that must be deleted. The nu...

delete folder from personal folders
i have accidentally deleted a folder from my personal folder and when i restore the pst file i cannot find it! any ideas? ...

Calling on a macro within a macro!
Hey All!! Quick Question - How do you call up a macro within a current macro? I have one big macro and I need it to jump to several other macros when it runs! Does it matter where the other macros are stored or is it better to have them all in one module? Help appreciated Thnx! Hi Mellowe, '=============>> Public Sub Main() 'Your code Call One 'your code End Sub '<<============= '=============>> Public Sub One() MsgBox "Hi from One" End Sub '<<============= > Does it matter where the other macros are stored or ...

shortcut keys to macros
Hi, Is it at all possible to assign shortcut keys to macros in Outlook? Thx, Hans ...

Message Received Since Installing XP SP2
This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C492A4.15722330 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Does anyone know what the below messages mean. I receive the messages = when trying to connect to my e-mail via Outlook Express or Outlook, = respectively. When I first bring up my machine, the POP3 interface = works fine. Then, in the middle of the day, I start receiving the below = messages indicating that it cannot connect - - and I can no longer = access e-mail. If I reboot my system, all is oka...

help Unable to record Macro !!!!!!!
I want to record a macro in excel.But as soon as I click record Macro it says "unable to record" macro. Got no help in excel help.I do this same thing in word and it's working. Please help It's urgent for me !!!1 Have a look here http://groups.google.com/groups?as_epq=unable%20to%20record&as_ugroup=microsoft.public.excel.* -- Don Guillett SalesAid Software donaldb@281.com "ash" <anonymous@discussions.microsoft.com> wrote in message news:3e0b01c42ae5$45333e00$a401280a@phx.gbl... > I want to record a macro in excel.But as soon as I click > record...

Reminider messages
I recently had to recover my .pst file due to it exceeding the 2gig limit. With the new .pst file that was created every email in my inbox get assigned automatically a reminder. Everytime I open Outlook I get a million reminder pop ups for every email in my inbox. Does anyone know how to stop this or do I have to build another .pst file. ...

Compacting
Windows XP Media Centre edition fully updated Compacting Outlook Express Before Compacting click on Local Folders Then Menu > File > Folder > Compact All Folders. Runs fine to Folders File then Warning/Error ?? Folders Fuile in use by Outlook Express or another application. Tried reboot then compact again before any other app sused problem persists. Any offers of help please -- Jim Bunton Is Fuile a user created folder or a typo? What is its size? Create a new folder. Move all the contents of the Fuile folder to it and delete the old one. If it is more ...