Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Opening an Explorer folder from a form

Geek News

Opening an Explorer folder from a form
Shimon <MalcolmX[ at ]fromru.com> 11/12/2008 10:48:55 AM
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.
Re: Opening an Explorer folder from a form
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> 11/12/2008 11:58:16 AM
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"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Shimon" <MalcolmX[ at ]fromru.com> wrote in message
news:e$uXxQLRJHA.4512[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> 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.


Re: Opening an Explorer folder from a form
"Stuart McCall" <smccall[ at ]myunrealbox.com> 11/12/2008 12:01:59 PM
"Shimon" <MalcolmX[ at ]fromru.com> wrote in message
news:e$uXxQLRJHA.4512[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> 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"


Re: Opening an Explorer folder from a form
Shimon <MalcolmX[ at ]fromru.com> 11/12/2008 1:58:30 PM
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

Douglas J. Steele wrote:
[Quoted Text]
> 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"
>
Re: Opening an Explorer folder from a form
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> 11/12/2008 2:40:37 PM
If your default view includes the folder (as it sounds as though it does),
try

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


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Shimon" <MalcolmX[ at ]fromru.com> wrote in message
news:OxDmG7MRJHA.444[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> 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
>
> Douglas J. Steele wrote:
>> 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"
>>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net