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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

coding in aba to read pdf files

Status
Not open for further replies.

jediknight80n

Programmer
Aug 14, 2003
1
MY
I'm trying to get my script to read pdf files via the
appropraite appplication(Adobe Acrobat Reader). I'm not
sure how to go about doing this. Can anyone please help?
I've supplied my codes below. I'm using an activex
component for the coding to read the pdf file. The
program is a HMI (Human Machine Interfacing) system.

Sub LoadFile(ByVal PDFFileName As String)

'Define the path and filename
PDFleName = "C:\Documents and Settings\Joy\My
Documents\PDFFileName.Pdf"

Set ObjAcrobat = CreateObject("Acrobat.Apllication")
ObjAcrobat.Visible = True
ObjAcrobat.Activate

End Sub


Sub Print()
Dim PDFFileName As String

'Define the path and filename
PDFFileName = "C:\Documents and Settings\Joy\My
Documents\PDFFileName.Pdf"

ActivePrinter = "Acrobat Distiller"
SendKeys PDFFileName & "{ENTER}", False
Application.PrintOut FileName:="",
Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False,
PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0,
PrintZoomPaperHeight:=0
End Sub


How do i get the program to open the file in it's native
environment? If i wanted to open multiple files how would
i do this?

Please help.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top