Opening an Explorer folder from a form

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.
 
D

Douglas J. Steele

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"
 
S

Stuart McCall

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"
 
S

Shimon

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
 
D

Douglas J. Steele

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

Top