Consulting

Results 1 to 3 of 3

Thread: VBA - Opening Windows folder ?

  1. #1
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    2
    Location

    VBA - Opening Windows folder ?

    Hi there,

    I'm using the following VBA to try and open a folder in Outlook. The code works in Excel but its not working for me in Outlook. Here's the code:

    Sub OpenFolderTest() 
    Dim Foldername As String
    Foldername = "C:\Temp\"
    Shell "explorer.exe" & " " & """ & Foldername & """, vbNormalFocus
    Does anyone know how to make this work perhaps?

  2. #2
    should be
    Shell "explorer.exe" & " " & """" & Foldername & """", vbNormalFocus

    or

    Shell "explorer.exe" & " """ & Foldername & """", vbNormalFocus



  3. #3
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    2
    Location
    Thanks for the tip.

    I also found out that all/any macro's had to be allowed through the Trust Center settings in Outlook. Its working now.

Posting Permissions

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