Opening PDF Files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code that opens an Excel Application.


Set AppName = CreateObject("Excel.Application")
AppName.Visible = True
AppName.Workbooks.Open filename:=strPathDoc


Is there similar code to open a pdf file? I can't seem to find the reference.
 
You can also try looking up "FollowHyperlink" and see if that will get the
job done for you. I use it and find it easy to use, since I don't have to
worry about what application to use to open a certain file.
 
Ugh. Thanks guys, sometimes I wish you weren't quite so helpful - now I get
to go learn something new.

I thought something like

Set AppName = CreateObject("AcroExec.Application")

would work.

I'll check out your tips, thanks again.
 
I thought something like

Set AppName = CreateObject("AcroExec.Application")

would work.

Trouble is that none of the (common) applications that read or manipulate
PDFs expose an ActiveX/ COM library. There is presumably no specific
reason for this, although it's a bit hard to know what such an API would
do. It's easy enough to print or open a document. Perhaps filling in a
form or reading one: then again an HTML form would have the same
functionality and would be _much_ easier to implement. Acrobat and
Acrobat Reader have DDE interfaces which you could look up. DDE is a bit
oldfashioned but still has its place.

There are loads of pdf readers and even writers about on the marketplace.
If you really want to do this, it might be worth looking round to see if
any of them do provide a COM interface.

All the best


Tim F
 
Back
Top