Open external program

B

bondy

Is there anyway I can get excel to search for, and open the latest
version of a PDF viewer (acrobat).
Have attached the current code, but as you can see, if I was to upgrade
my pdf viewer to another version, it will not load.

I hope this make sense

Dim retval
retval = Shell("c:\program files\adobe\acrobat 4.0\reader\acrord32
\\server\share\folder\" +
ActiveSheet.Range(ActiveWindow.RangeSelection.Address) + ".pdf",
vbNormalFocus)

End Sub

Your help is greatly appreciated
 
J

jaf

Hi,
Shelling to windows start should use the latest version.

Dim retval
retval = Shell("start acrord32.exe" & "\\server\share\folder\" & _
ActiveSheet.Range(ActiveWindow.RangeSelection.Address) & ".pdf",
vbNormalFocus)

End Sub
 

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