Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 154536

AcroExch.AVDoc.FindText(), Acrobat XI

$
0
0

Code fromChapter 16 Scripting Quicktest Professional Page 25,  Dani Vainstein

 

FindText(): Finds the specified text,

but doesn't scrolls so that it is visible, and doesn't highlights it

 

Dim AcroApp, AcroAVDoc As Object
Dim gPDFPath, bReset, nCount
gPDFPath = "c:\Input.pdf"

Set AcroApp = CreateObject("AcroExch.App")
AcroApp.Show
Set AcroAVDoc = CreateObject("AcroExch.AVDoc")

If AcroAVDoc.Open(gPDFPath, "") Then
AcroAVDoc.BringToFront
bReset = True: nCount = 0
Do While AcroAVDoc.FindText("9630208046", True, True, bReset)
bReset = False: nCount = nCount + 1
Loop
End If
AcroApp.CloseAllDocs
AcroApp.Exit
Print "The word '9630208046' was found " & nCount & " times."
Set AcroApp = Nothing
End Sub

 

With Acrobat 9 and Access the program works. Is there a Workaround for Acrobat XI.


Viewing all articles
Browse latest Browse all 154536

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>