Bonjour,
J'utilise un code de KIKI29, mais ça bloque par un message :le code :Erreur d'exécution "Cette interface n'est pas prise en charge"
j'utilise Acrobat reader DC version 2022.001.20169 64 bits
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
47
48
49
50
51 Option Explicit Sub SelFichier_Acrobat() Dim Fichier As Variant Dim sMot As String ChDir ThisWorkbook.Path ' Mot à rechercher sMot = "Système de refroidissement" Fichier = Application.GetOpenFilename("Fichier PDF (*.pdf), *.pdf") If Fichier <> False Then AcrobatFindText Fichier, sMot End Sub Private Sub AcrobatFindText(ByVal sFichier As String, ByVal sRch As String) Dim AcroApp As Object Dim AvDoc As Object Dim iTrouvé As Integer Set AcroApp = CreateObject("AcroExch.App") AcroApp.Hide Set AvDoc = CreateObject("AcroExch.AVDoc") Application.StatusBar = "" If AvDoc.Open(sFichier, "") Then If Len(sRch) > 0 Then ' Parametres FindText ' StringToSearchFor , ' caseSensitive (1 Or 0), ' WholeWords(1 Or 0), ' ResetSearchToBeginOfDocument (1 Or 0) ' Renvoie -1 si Trouvé, 0 autrement iTrouvé = AvDoc.FindText(sRch, True, True, True) If iTrouvé = True Then Application.StatusBar = sRch & " : Trouvé" AcroApp.Show AvDoc.BringToFront Else AvDoc.Close (1) Application.StatusBar = sRch & " : Introuvable" End If End If End If Set AvDoc = Nothing Set AcroApp = Nothing End Sub
le problème est surement là??
Partager