Multiple Apps

Browse the folder of your active document or workbook

Ease of Use


Version tested with


Submitted by:



Opens the folder which contains your current open file 


I often need to open a related file to that where I'm working. This single line code simplifies the operation. 


instructions for use


'Word Option Explicit Sub ExplorePath() Shell Environ("windir") & "\Explorer.exe " & ActiveDocument.Path, vbMaximizedFocus End Sub 'Excel Option Explicit Sub ExplorePath() Shell Environ("windir") & "\Explorer.exe " & ActiveWorkbook.Path, vbMaximizedFocus End Sub

How to use:

  1. Copy above code.
  2. Press Alt + F11 to enter the VBE.
  3. Press Ctrl + R to show the Project Explorer.
  4. Select desired file on left (in bold).
  5. If desired all the time, use Personal or Normal as appropriate.
  6. Choose Insert | Module.
  7. Paste code into the right pane.
  8. Click File | Save.
  9. Press Alt + Q to close the VBE.

Test the code:

  1. Open Word or Excel file from the sample and save in a suitable folder.
  2. Press Alt + F8, select the ExplorePath macro and click on Run
  3. or, in the sample files, click the button.

Sample File: 13.77KB 

Approved by mdmackillop

This entry has been viewed 156 times.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2020 VBA Express