Public Function AdobeTest() As Long
Dim lng As Long
Dim chanNo As Long
Dim strPath As String
Dim printName As String
Dim driverName As String
driverName = """"""
printName = """PrimoPDF"""
strPath = """C:bibentries.pdf"""
lng = Shell("C:Program FilesAdobeReader 10.0ReaderAcroRd32.exe", vbNormalFocus)
chanNo = DDEInitiate("AcroViewR10", "Control")
DDEExecute chanNo, "[DocOpen(" & strPath & ")]"
DDEExecute chanNo, "[FileOpen(" & strPath & ")]"
DDEExecute chanNo, "[DocGoTo(" & strPath & ", 2)]"
DDEExecute chanNo, "[FilePrintTo(" & strPath & "," & printName & "," & driverName & ")]"
DDEExecute chanNo, "[DocClose(" & strPath & ")]"
DDEExecute chanNo, "[AppExit( )]"
End Function
|