Simple Macro

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Is there a simple macro for Outlook, that opens a folder from the Computer.....so as example, if the folders located at: C:\Users\Username\Documents\FolderName is there a macro the simply opens up that folder under my Documents folder? And if there is a shortcut to a folder or a document for the desktop....is there a way to use that shortcut in Outlook? And if there any code, I still need the full code, not just one line....thanks thanks thanks!!:D:D:D
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Sure can.... need to use the shell command... and um, it's really is just one line. :)

Sub Openwindows()

Shell ("EXPLORER.EXE " & "C:\Users\Diane\Documents"), vbNormalFocus

End Sub

if you want 2 lines... there is a variation. I'm not really sure when you'd use this method though - the one liner should work for just about everything thing.

Sub Openwindows()

Dim o As Variant
o = Shell("EXPLORER.EXE C:\Users\Diane\Documents", vbNormalFocus)

End Sub
 
Top