Need to find Path to Picture Manager

G

Gypsy

I am working in Access and am trying to open a picture thru Picture Manager.
I found the code to open the application:

Private Sub Command1_Click()

Dim stAppName As String

stAppName = "C:\Program Files\Adobe\Photoshop 6.0\Photoshp.exe"
Call Shell(stAppName, 1)

End Sub

But I cannot find the correct filepath to Office Picture Manager. The only
path I can find is to a shortcut in my Documents and Settings\Start Menu...

Anyone have an idea on where else I can look?

Thanks!
 
J

Jeanette Cunningham

Gypsy,

You need to pass the name of the file when you shell out to Picture Manager.
In order to handle the possiblities of spaces in the file name, you need to
enclose it in quotes. Try something like:

If Len(strInputFileName) > 0 Then
stAppName = "C:\Program Files\Microsoft Office\OFFICE11\OIS.EXE " &
_
Chr$(34) & strInputFileName & Chr$(34)
Call Shell(stAppName, vbNormalFocus)
End If

I'm checking the length of strInputFileName to ensure that you actually
selected a file in the dialog. Note the blank after .EXE when definining
stAppName


Jeanette Cunningham -- Melbourne Victoria Australia
 

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