Bonjour,

Je souhaiterai faire un programme VBA sous excel qui utilise Adobe Acrobat Pro :
ouvre un fichier PDF
verifie si le fichier respecte la norme archivable Pdf
Si non : enregistre sous type Archivable PDF (PDF/A).

Quelle fonction VBA peut on utiliser pour vérifier et pour enregistrer sous Archivable Pdf ?

Merci,

Pour étayer ma demande d'Aide, voilà où j'en suis.
Le programme s’arrête sur boResult = objJSO.SaveAs(NewFilePath, ExportFormat) et je n'ai pas réussi à vérifier si le fichier était déjà au format.

Message d'erreur :
Erreur d'exécution '1001' : UnsupportedValueError : Value is unsupported.===> Parameter cConvID
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Sub ConvertisseurPDFA()
Dim CheminPDF As String
Dim objAcroApp      As Acrobat.AcroApp
Dim objAcroAVDoc    As Acrobat.AcroAVDoc
Dim objAcroPDDoc    As Acrobat.AcroPDDoc
Dim objJSO          As Object
Dim boResult        As Boolean
Dim ExportFormat    As String
Dim NewFilePath     As String
 
 
Repertoire = "G:\Documents\"
'Do While Cells(i, 1) <> ""
'    Fichier = Cells(i, 1)
    Fichier = "test.pdf"
'    i = i + 1
'    Loop
 
CheminPDF = Repertoire & Fichier
 
 
    If Dir(CheminPDF) = "" Then
        MsgBox "Cannot find the PDF file!" & vbCrLf & "Check the PDF path and retry.", _
                vbCritical, "File Path Error"
        Exit Sub
    End If
 
    If LCase(Right(CheminPDF, 3)) <> "pdf" Then
        MsgBox "The input file is not a PDF file!", vbCritical, "File Type Error"
        Exit Sub
    End If
 
    Set objAcroApp = CreateObject("AcroExch.App")
    Set objAcroAVDoc = CreateObject("AcroExch.AVDoc")
    boResult = objAcroAVDoc.Open(CheminPDF, "")
 
    Set objAcroPDDoc = objAcroAVDoc.GetPDDoc
    Set objJSO = objAcroPDDoc.GetJSObject
 
    NewFilePath = Repertoire & Left(Fichier, Len(Fichier) - 4) & " (PDFA).pdf"
    ExportFormat = "com.callas.preflight.pdf"
    boResult = objJSO.SaveAs(NewFilePath, ExportFormat)
    boResult = objAcroAVDoc.Close(True)
    boResult = objAcroApp.Exit
 
End Sub