View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Open file with foxit when adobe reader is default application

I don't have foxit reader on this pc.

But if this is just for you (or for people that have the same exact setup as
you), maybe you can just do something like:

Shell "c:\program files\foxitreaderfolder\foxitreader.exe " & strHelpPath

You could add a check to verify that the reader is where you expect it. If not,
then use the default application.



Poniente wrote:

Hi,
I'd like to sometimes open pdf files with foxit reader, but want to
keep the default reader Adobe Reader.

At the moment I'm using this code:

Sub OpenPdffile()
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
strHelpPath = "C:\pdffile.pdf"
If FSO.FileExists(strHelpPath) Then
StartDoc (strHelpPath)
End If
End Sub

Function StartDoc(DocName As String) As Long
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
StartDoc = ShellExecute(Scr_hDC, "Open", DocName, _
"", "C:\", SW_SHOWNORMAL)
End Function

Is there anyone able (and willing ;-) ) to help me out?

Poniente


--

Dave Peterson