Opening Windows Explorer from Access

  • Thread starter Thread starter Paul
  • Start date Start date
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
 
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
 
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?
 
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)
 
Back
Top