Adobe reader XI et vba access 2010
bonjour,
je veux ouvrir un fichier pdf par du vba access, j'ai parcouru le forum je n'ai trouvé que ce code.
Code:
1 2
| Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" _
(ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long |
en tête de module puis dans le module
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub OuvrirPdf()
Dim strAcroPath As String, strFichier As String
Dim intPage As Integer
strAcroPath = String(128, 32)
strFichier = "ca269" 'A COMPLETER
intPage = 3 'A COMPLETER
If FindExecutable(strFichier, vbNullString, strAcroPath) <= 32 Then
MsgBox "Adobe Acrobat Reader n'a pas été trouvé sur cet ordinateur", vbOKOnly + vbCritical, "Message d'erreur"
Else
strAcroPath = Left$(strAcroPath, InStr(strAcroPath, Chr$(0)) - 1)
Shell strAcroPath & " /a page=" & intPage & " " & strFichier, vbNormalFocus
End If
End Sub |
quand je lance la fonction, il me répond qu'il ne trouve pas le programme adobe reader (j'ai sans doute fait une erreur d'accepter la mise à jour en adobe reader 11)
quelqu'un a-t-il la solution?
merci par avance
adobe reader XI et vba access 2010
bonjour
mes fichiers pdf sont créés soit avec adobe reader soit avec pdf creator, soit à partir de word , .
j'ai essayé la solution mais une erreur se produit:
erreur de compilation utilisation incorrect du mot clé Me
merci
adobe reader XI et vba access 2010
re bonjour,
j'ai remplacé par 0, la fonction s'exécute sans erreur, adobe reader ne s'ouvre pas
merci