Getting Outlook to Find and Jump to a Folder in Folder List

Posted on 2012-08-27
Last Modified: 2012-08-29
I have been using the excellent work of  chris_bottomley to iterate through the Outlook folder list to find a folder:

I am wondering if someone can help me adapt this macro slightly to do the following:

1) In the current macro, once the folder is found, the folder list jumps to that spot. That found folder is highlighted, but if it is too far down (or up) in the list, it is not visible in the folder list and I have to scroll to it. I would like it to both find and jump to be visible on the screen.
2) Instead of displaying the messages in the now found folder, as the macro does now, I would like to keep the messages displayed that were visible when the macro was called. This would allow me to easily copy some of these messages to the found folder which is now visible on the left.

I would be grateful for anyone that can show me how to adapt the macro code in the link above to do these things differently.

Question by:KenHadley
    LVL 67

    Accepted Solution

    I recommend to replace line 31:
      Set olApp.ActiveExplorer.CurrentFolder = tgtFolder
    That will open a new Outlook Explorer window. Only con is that you need to close that window if unwanted, as the loop will open a new window for each go. But your current folder will not change, and the new Explorer will scroll to the correct folder in the list and show the content of it.

    Author Closing Comment

    Yes, thank you, that works.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Learn more about the importance of email disclaimers with our top 10 email disclaimer DOs and DON’Ts.
    Use email signature images to promote corporate certifications and industry awards.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now