1. Here's a thread that needs an answer: Table AutoFit > AutoFit to Contents
    Dismiss Notice

Auto scroll to specific folder in Folder Pane

Discussion in 'Outlook VBA and Custom Forms' started by ptuga, Oct 8, 2017.

  1. ptuga

    ptuga

    New Member
    Hello,

    I'm using Windows 10/Outlook 2013 32-bit.

    It's my first time in this forum!
    Maybe anyone can help me on this question.

    I'm running some VBA code where I jump to a folder displaying all items on it.
    This is the relevant line I use to perform the task:
    Set Application.ActiveExplorer.CurrentFolder = ObjectPath (which is my folder object)

    The reaction of outlook is almost correct:-
    The items window shows the items for that folder (folder contents are displayed);
    Seems that the first item is selected (that's OK too);
    The Folder pane opens that folder (expands);

    BUT, what does not happen is that, there is no automatic scroll up or down to that folder so that it's position in the visible area. Ideally, sowing the specific folder as the first at the top of the window.

    If I had just a few folders, this wouldn't even notice, but I have a considerable amount of psts and folders which makes it difficult to manage. I have to scroll up/down to see the folder that is displaying the items.

    Please feedback.
    Thanks in advance.

    Regards,
     
  2. Diane Poremsky

    Diane Poremsky

    Senior Member
    AFAIk, you can't scroll the pane to bring it to the top - it will only expand the folder in the folder pane.
     
  3. ptuga

    ptuga

    New Member
    Hi Diane,

    Many thanks for the feedback.
    Best Regards,
     
  4. niton

    niton

    New Member
    I found this code will autoscroll except sometimes the Inbox.


    Code (Text):
    Copy Source
    Sub Folder_Inbox()

        ActiveExplorer.ShowPane olFolderList, True
        Set ActiveExplorer.CurrentFolder = Session.GetDefaultFolder(olFolderInbox)
       
    End Sub
     
Loading...

Share This Page