Opening Windows Explorer from Access

P

Paul

I'm using the following code to open Windows Explorer to a folder designated
in a Text Box in the form:

strPath = Me!txtPath
ShellID = Shell("Explorer.exe" & " " & strPath)

However, there are two things about the way Windows Explorer opens from this
command that I would like to change:

1. When Win Explorer opens, it opens minimized, and
2. the folder list is not displayed in the Left pane.

How can I modify this code so that Windows Explorer opens in normal view
(neither maximized nor minimized), and how can I get it to display the two
panes with the folder list in the left pane?

Thanks in advance,

Paul
 
S

Stuart McCall

Paul said:
I'm using the following code to open Windows Explorer to a folder
designated in a Text Box in the form:

strPath = Me!txtPath
ShellID = Shell("Explorer.exe" & " " & strPath)

However, there are two things about the way Windows Explorer opens from
this command that I would like to change:

1. When Win Explorer opens, it opens minimized, and
2. the folder list is not displayed in the Left pane.

How can I modify this code so that Windows Explorer opens in normal view
(neither maximized nor minimized), and how can I get it to display the two
panes with the folder list in the left pane?

Thanks in advance,

Paul

Application.FollowHyperlink strPath
 
P

Paul

Thanks for the suggestion, Stuart.

Application.FollowHyperlink seems to be a partial solution, because (in my
Workstation) it does open Win Explorer in Normal view instead of minimized,
but it still opens as a single pane, rather than showing the folder
directory in the left pane. Is there any way to open Win Explorer with the
folder pane visible when it opens?
 
S

Stuart McCall

Paul said:
Thanks for the suggestion, Stuart.

Application.FollowHyperlink seems to be a partial solution, because (in my
Workstation) it does open Win Explorer in Normal view instead of
minimized, but it still opens as a single pane, rather than showing the
folder directory in the left pane. Is there any way to open Win Explorer
with the folder pane visible when it opens?

Interesting. On my system (win xp sp2) it opens a dual-pane window. Never
mind - back to the Shell function. FollowHyperlink doesn't allow
command-line switches, which is what we need here. Try this:

shell "explorer /e, \\Server\Shared\Resource", vbNormalFocus

/e opens a dual-pane window (explorer view)
/n opens a single-pane window (normal view)
 

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