#1
|
|||
|
|||
Outlook VBA to open a windows folder
Hi
I'm using Office 2013 What is the Outlook VBA code I need to open a windows folder? (preferably the VBA will check the folder is not already open) Many thanks Andy |
#2
|
||||
|
||||
'Open' it for what purpose?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Hi Graham, I have the Outlook VBA code that saves my email attachments to a particular folder eg C:\OutlookAttachments
Now I want to add to that code so the last thing it does is to open up the location of where the files are saved, in this example to open "C:\OutlookAttachments" Or better still a message box - "Do you want to open the folder..?- yes or no? Do you know how to do this? I have office 2013 and win 7 FYI Thanks Andy |
#4
|
||||
|
||||
OK, you need a simple function to open Windows Explorer e.g.
Code:
Sub OpenAtFolder(strPath As String) Shell "cmd /C start """" /max """ & strPath & """", vbHide lbl_Exit: Exit Sub End Sub Code:
If MsgBox("Do you want to open the folder..?", vbYesNo) = vbYes Then OpenAtFolder "C:\OutlookAttachments\" End If
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2010: Saving attachments opens up wrong windows folder to save in | jeroen | Outlook | 0 | 09-29-2015 01:51 AM |
How to open Documents folder directly from CTRL+O of Open folder on QAT | scvjudy | Word | 2 | 08-11-2014 10:58 PM |
Cannot open folder in Outlook | marketshare | Outlook | 0 | 03-17-2013 04:07 PM |
Outlook slow to open folder | rtankersley | Outlook | 1 | 09-16-2008 05:42 AM |
Programatically open Outlook folder (set focus) using RDO? | NicMic | Outlook | 0 | 01-10-2008 03:27 PM |