Au secours ouvrir acrobat et imprimer un pdf en vba
cs_Led0b
Messages postés7Date d'inscriptionmardi 8 janvier 2002StatutMembreDernière intervention14 février 2002
-
31 janv. 2002 à 12:32
raph007
Messages postés22Date d'inscriptionlundi 12 mai 2003StatutMembreDernière intervention20 mai 2005
-
3 juil. 2003 à 11:53
Comment pourrais je faire pour ouvrir acrobat et imprimer en vba
J'ai recuper la bibliotheque acrobat mais je n'arrive pas ouvrir acrobat ni à imprimer
raph007
Messages postés22Date d'inscriptionlundi 12 mai 2003StatutMembreDernière intervention20 mai 2005 3 juil. 2003 à 11:53
Salut moi j'arrive a l'ouvrir mais avec le code suivant je n'arrive pas a fermer acrobat je te le donne on ne sait jamais
'déclaration des variables
'Dim strCommandLine As String
'Dim strPrinterName As String
'Dim strDriverName As String
'Dim strPortName As String
'Dim strFileNameToPrint As String
'Dim AppAcrobat As Long
''set du chemin d'accès des TPS pour la vairable
'strFileNameToPrint = "c:\simule" & lstproject.SelectedItem.Text & ".pdf"
'
''set des variables pour la reconnaissance des imprimantes a utilisées
'strPrinterName = Printer.DeviceName
'strDriverName = Printer.DriverName
'strPortName = Printer.Port
'
''check du répértoire a utilisé
'Directory = Dir("C:\Program Files\Adobe\Acrobat 4.0\Reader\AcroRd32.exe", vbDirectory)
'If Directory <> "" Then
'
' 'set de la variable pour l'impression
' strCommandLine = "C:\Program Files\Adobe\Acrobat 4.0\Reader\AcroRd32.exe /t """ + _
' strFileNameToPrint + """ """ + _
' strPrinterName + """ """ + _
' strDriverName + """ """ + _
' strPortName + """"
'Else
' 'check du répertoire a utilisé
' Directory = Dir("C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe", vbDirectory)
' If Directory <> "" Then
'
' 'set de la variable pour l'impression
' strCommandLine = "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe /t """ + _
' strFileNameToPrint + """ """ + _
' strPrinterName + """ """ + _
' strDriverName + """ """ + _
' strPortName + """"
' Else
' MsgBox "Acrobat Reader is missed on your PC, please contact the IS-Team", vbInformation
' End If
'End If
'
''impression du document
'AppAcrobat = Shell(strCommandLine, vbHide)
' 'MsgBox "Job has been sent to the printer using the command " + strCommandLine
ps c'est en vb mais bon cela dois fnctionné en vba