Open Application to Specific Directory

S

Sash

I've developed a program to look at historical records and it's working just
fine except one minor annoying thing.

The following code opens Microsoft Picture Manager to view the images, but I
need it to open and view a specific directory. Is that possible??

stAppName = "C:\Program Files\Microsoft Office\OFFICE11\OIS.EXE"
Call Shell(stAppName, vbNormalFocus)
 
P

Paolo

Hi Sash,

add the path of your directory after ois. exe and that'll do the trick. Add
a space after OIS.EXE to separate the string with the path
e.g. if you'd like to open the pics in c:\pics then
stAppName = "C:\Program Files\Microsoft Office\OFFICE11\OIS.EXE " & "c:\pics"
Call Shell(stAppName, vbNormalFocus)

HTH Paolo
 
T

Tom van Stiphout

On Fri, 31 Jul 2009 06:31:01 -0700, Sash

It doesn't seem to support command line options, nor Automation, so
you may have to continue to do this manually.

-Tom.
Microsoft Access MVP
 
S

Sash

This seems to work just perfect. THANK YOU!!!!

Paolo said:
Hi Sash,

add the path of your directory after ois. exe and that'll do the trick. Add
a space after OIS.EXE to separate the string with the path
e.g. if you'd like to open the pics in c:\pics then
stAppName = "C:\Program Files\Microsoft Office\OFFICE11\OIS.EXE " & "c:\pics"
Call Shell(stAppName, vbNormalFocus)

HTH Paolo
 

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