Je cherche à récupérer une chaine de caractère dans un fichier pdf à partir d'excel . J'utilise pour cela visual basic. J'arrive à :
- ouvrir mon fichier pdf
- rechercher la page ou se trouve la chaine que je recherche


MAIS PAS A RECUPERER LA CHAINE EN ELLE MEME. En gros , je voudrais rechercher une date qui se trouve juste après une chaîne de caractère précisée . Si quelqu'un peut m'aider. Voici mon code


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
Sub essai2()
Dim gApp As Acrobat.CAcroApp
Dim AcroExchAVDoc As CAcroAVDoc
Dim AVPage As CAcroAVPageView
Dim bOK, bFound As Boolean
Dim i As Long, lngPage As Long
Dim lngAnswer As Long
 
Set gApp = CreateObject("AcroExch.App")
Set AcroExchAVDoc = CreateObject("AcroExch.AVDoc")
gApp.Show
 
bOK = AcroExchAVDoc.Open("D:\Download\AcroJSGuide.pdf", "")
 
If (bOK) Then
bFound = AcroExchAVDoc.FindText("Application :", True, True, True)
If (bFound) Then
Set AVPage = AcroExchAVDoc.GetAVPageView
lngPage = AVPage.GetPageNum
MsgBox ("Trouvée à la page : " & lngPage)
Set AVPage = Nothing
End If
Else
lngAnswer = MsgBox("Inconnue!!!", vbCritical, "Erreu")
End If
 
AcroExchAVDoc.ClearSelection
AcroExchAVDoc.Close 1
Set AcroExchAVDoc = Nothing
 
 
gApp.Exit
 
End Sub