Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OPEN PDF FILE

Status
Not open for further replies.

mlalib

Programmer
Sep 17, 2001
13
CA
Hello,
is there a way to open a PDF file in lotusscript or javascript ( or formula ) without specifying the executable???

The file is on the harddrive, not in the database.
I don`t want to use de `Shell` function cause I need to specify the acrobat reader`s executable or the browser`s executable.

thanx for your help!!
 
Hello,

Here`s what I found...

Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (Byval lpFile As String, Byval lpDirectory As String, Byval lpResult As String) As Long


Function FindExByFileName(Byval Datei As String) As String
Dim Pfad As String
Pfad = Space$(256)
FindExecutable Datei, vbNullString, Pfad
FindExByFileName = Trim(Pfad)
End Function

-----------
you run it like this:

file1 = "C:\report.pdf"

'get application to be loaded
app = FindExByFileName( file1 )

myApp = app + " " + file1
GoNow = Shell( myApp, 1)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top