Bonjour,

J'ai encore un autre maux de tète, j'ai essayé d’adapter un code de Maitre KIKI29 mais je crois que je n'y arriverais jamais.

Apres plusieur heures d'essais je n'ai plus de bugg mais rien ne ce passe

Pouvez-vous m'aidé

En vous remerciant d'avance.


Bien à vous

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
Sub Fusion_PDFs()
 
 
Dim oPDDoc1 As Variant
    ChDir ThisWorkbook.Path & "\"
    oPDDoc1 = Application.GetOpenFilename("Fichiers PDF (*.pdf), *.pdf", Title:="Sélection PDF")
    If oPDDoc1 = False Then Exit Sub
 
 
Dim oPDDoc2 As Variant
    ChDir ThisWorkbook.Path & "\"
    oPDDoc2 = Application.GetOpenFilename("Fichiers PDF (*.pdf), *.pdf", Title:="Sélection PDF")
    If oPDDoc2 = False Then Exit Sub
 
 
Dim AVDoc1 As Object
Dim AVDoc2 As Object
Dim sChemin As String
Dim sChemin1 As String
 
 
Set AVDoc1 = CreateObject("AcroExch.PDDoc")
sChemin = sChemin
 
Set AVDoc2 = CreateObject("AcroExch.PDDoc")
sChemin1 = oPDDoc2
 
 
 
 
   AVDoc1.InsertPages 7, AVDoc2, 0, 1, 0
   AVDoc1.Save 1, ThisWorkbook.Path & "\" & "Fusion2.pdf"
 
   AVDoc2.Close
   AVDoc1.Close
 
    Set AVDoc2 = Nothing
    Set AVDoc1 = Nothing
 
 
    MsgBox "Created "
End Sub