PDF

  • Thread starter Thread starter Al
  • Start date Start date
A

Al

I have a table with a field that hods PDF file path. I
would like to open the PDF file by clicking on it within
the form that is based on that table. any idea?
thanks
Al
 
Set up your tables field definition to "HyperLink"........then all the data
stored in this field will be a hot link to whatever you desire.
HTH
Bill
 
I wanted to use it as Text to save on memory. the hyperlink
takes up more than text.
Al
-----Original Message-----
Set up your tables field definition to
"HyperLink"........then all the data
 
Place code like this in the click event of your textbox:

Private Sub txtPDf_Click()
Dim strFile As String
strFile = "c:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " &
Me.txtPDf & ""
Shell strFile, vbNormalFocus
End Sub

Make sure the path to Acrobat reader is the correct one.
 
Al

What happens if one or more of your uses has acrobat 6.0, or has the full
version of Acrobat 5?

What you really need to do is to use ShellExecute which will find the
application that is registered for the file type and launch that application
to load your file. ShellExecute is the universal way to do this. See the
code at http://www.mvps.org/access/api/api0018.htm for example of how to get
this to work in your app.

Ron W
 
Back
Top