Consulting

Results 1 to 10 of 10

Thread: How to get 'focus' of Outlook folder in vba

  1. #1
    Banned VBAX Regular
    Joined
    Jan 2021
    Posts
    5
    Location

    How to get 'focus' of Outlook folder in vba

    I have posted this question on several websites, and it seems to be always misunderstood.

    When you open outlook (windows) a folder (generally Inbox) has the focus. By focus, I mean it is the one that has a listing of the emails received. If you go to another folder (like Trash) and then run a macro (vba) the focus stays on that folder (in this example Trash). I would like to know how to force the focus back to the Inbox. My macro deletes (erases) all files in my Deleted folder and Trash folder. I would like it to come back to the Inbox when complete.

    I am not talking about a 'Focused Inbox' but the highlighted folder. Maybe I should be saying to go back to highlight Inbox!?

    It appears that when running a macro the highlighted folder stays as before the macro is run. I would like the vba code to set it back to Inbox.

    Any help would be appreciated.

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,265
    Location
    Quote Originally Posted by JimReid View Post
    I have posted this question on several websites
    Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq...._new_faq_item3
    Doubtless the other sites have similar rules, so your compliance on all sites is expected.

    No help will be provided here until you provide the relevant cross-post links.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Banned VBAX Regular
    Joined
    Jan 2021
    Posts
    5
    Location
    Paul, The postings that I tried before was for a different forum not connected with vbaexpress. In all cases the only response I got was about creating a "Focused Inbox" which is not what I'm looking for or the answer to my question. Several lectured me on what 'Focus' meant instead of understanding the question and attempting to answer it. I think I made the question clearer here on vbaexpress for the sole purpose of getting to the root of the problem. There are no cross-references to other postings because they were not helpful and actually rather abusive in their responses. Hopefully the people on vbaexpress will be more forthcoming.

  4. #4
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,265
    Location
    Quote Originally Posted by JimReid View Post
    The postings that I tried before was for a different forum not connected with vbaexpress.
    Which is precisely what cross-posting is about. Kindly read the rules and comply.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  5. #5
    Banned VBAX Regular
    Joined
    Jan 2021
    Posts
    5
    Location
    I did read the rules and they don't apply. The other postings did even attempt to answer the original question they misinterpreted what I was asking as I mentioned in the previous posting. Never mind I'll go somewhere else.

  6. #6
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,265
    Location
    Quote Originally Posted by JimReid View Post
    I did read the rules and they don't apply. ... Never mind I'll go somewhere else.
    With that kind of attitude, don't expect to find yourself welcome for very long on any forum.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  7. #7
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,265
    Location
    Last edited by macropod; 01-30-2021 at 02:30 PM.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  8. #8
    Banned VBAX Regular
    Joined
    Jan 2021
    Posts
    5
    Location
    Fine

  9. #9
    Banned VBAX Regular
    Joined
    Jan 2021
    Posts
    5
    Location
    And I got my answer without all the BS about cross postings or people trying to tell me I wanted a "Focused Inbox" which wasn't what I was asking.

  10. #10
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,265
    Location
    Account terminated.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •