How do I open a PDF from a file using access 
Author Message
 How do I open a PDF from a file using access

I am storing image name, directory and path within my database for pdf files
that need to be viewed.  What is the code that I need to do this?

thanks!
kat



Mon, 22 Mar 2004 21:49:47 GMT  
 How do I open a PDF from a file using access
Watch out for line wraps, everything after Shell on 1 line.

Public Sub OpenPdf()
   Shell """C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe""" & "c:\temp\Portfolio2.pdf", vbMaximizedFocus
End Sub

Quote:

> I am storing image name, directory and path within my database for pdf files
> that need to be viewed.  What is the code that I need to do this?

> thanks!
> kat



Mon, 22 Mar 2004 22:54:02 GMT  
 How do I open a PDF from a file using access
Do you want to view the image -- in Access or in a separate program -- or
open the PDF file?  If you want to view the image in Access, you can use an
unbound image control and set its Picture property to the path.  If you want
to open either the image or the pdf itself in a separate program (such as an
image editor or Acrobat Reader), you can do it easily if the file extension
is registered with the operating system to open with that particular
application.  You can use either the ShellExecute API (code to be found
here: http://www.mvps.org/access/api/api0018.htm ) or you can probably use
the Application.FollowHyperink method with the path to the file
(Application.FollowHyperlink "C:\FilePath\Filename.ext").

--
Dirk Goldgar
www.datagnostics.com

(to reply via e-mail, remove NOSPAM from address)


Quote:
> I am storing image name, directory and path within my database for pdf
files
> that need to be viewed.  What is the code that I need to do this?

> thanks!
> kat



Mon, 22 Mar 2004 22:53:59 GMT  
 How do I open a PDF from a file using access
Thank you both!  Both solutions worked.  I greatly appreciate your
assistance.

kat

Quote:
> I am storing image name, directory and path within my database for pdf
files
> that need to be viewed.  What is the code that I need to do this?

> thanks!
> kat



Mon, 22 Mar 2004 23:52:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Using Shell Command to open pdf files.

2. Opening a .pdf file using Acrobat Reader from VB

3. How to open a pdf/txt file using VB6

4. Opening PDF file from Access

5. Opening a PDF file w/o opening acrobat first

6. Printing pdf files from ms-access using vba

7. Specifiying a Workgroup File When Using ADO to Open an Access .mdb file (OLEDB)

8. HOw to convert text FILE IN TO PDF FILE through VB CODE USING adobe type library

9. Open and Read a PDF file

10. Open a PDF File

11. CommandButton to open a TIF or PDF file?

12. Open files in another program, like pdf, xls or ppt

 

 
Powered by phpBB® Forum Software