Opening an Explorer folder from a form

  • Thread starter Thread starter Shimon
  • Start date Start date
S

Shimon

Hi Again,

How do I make a button to open an explorer folder?
I have a button that runs some make table queries that prepare for a
mail-out. I have some documents set up to use these tables. I would like
the user to see a button that opens the explorer folder that has these
documents(which have similar names to the country of destination of the
letters) so that the printout of these documents will be almost self
explanatory.
 
It's not clear to me whether you want to open to open Windows Explorer in a
certain folder, or want to open the standard Windows File Save dialog.

To open Windows Explorer to a specific folder, you can use:

Shell "explorer.exe ""F:\Folder\""", vbNormalFocus

To use the Windows File Save dialog, see
http://www.mvps.org/access/api/api0001.htm at "The Access Web"
 
Shimon said:
Hi Again,

How do I make a button to open an explorer folder?
I have a button that runs some make table queries that prepare for a
mail-out. I have some documents set up to use these tables. I would like
the user to see a button that opens the explorer folder that has these
documents(which have similar names to the country of destination of the
letters) so that the printout of these documents will be almost self
explanatory.

If your documents are in C:\Temp, what you need is:

Application.FollowHyperlink "C:\Temp"
 
Thanks Douglas and Stuart.
The two solutions don't have the same outcome. One opens a folder with
the directory tree on the left and one opens only the folder.
Have a great day.
Blessings from the holy city.
If you want I'll put a good word in for you at the Wall, just give a holler,
Shimon
 
If your default view includes the folder (as it sounds as though it does),
try

Shell "explorer.exe /e,""F:\Folder\""", vbNormalFocus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top