Private Sub PrintAdobePDF(ByVal strFilePath As String)
On Error Resume Next
Dim App As Object
Dim AVDocument As Object
Dim PDDocument As Object
Dim nPages As Object
App = CreateObject("AcroExch.App")
AVDocument = CreateObject("AcroExch.AVDoc")
If AVDocument.Open(strFilePath, "") = True Then
PDDocument = AVDocument.GetPDDoc()
nPages = PDDocument.GetNumPages()
Call AVDocument.PrintPagesSilent(0, nPages - 1, 0, True, True)
Call AVDocument.Close(True)
AVDocument = Nothing
PDDocument = Nothing
End If
Call App.Exit()
App = Nothing
End Sub
|