getting PDF document in browser window
I am trying to do some PDF verification using the Adobe Acrobat API in QTP. I can't seem to get the script to recognize the PDF document when it loads in a browser window. For example, the following code (I did this as a proof-of-concept, but I am going to do much, much more with this when I can get it to work in QTP) works fine when I just run it on a document that exists locally and is open in Acrobat:
Dim AcroApp, AcroAvDoc
Dim bReset, nCount
Set AcroApp = CreateObject( "AcroExch.App" )
Set AcroAvDoc = AcroApp.GetActiveDoc()
bReset = True
nCount = 0
If Not AcroAVDoc Is Nothing Then
Do While AcroAVDoc.FindText("Mister Insured", False, True, bReset)
bReset = False
nCount = nCount + 1
'Wait 0, 200
MsgBox "The name 'Mister Insured' was found " & nCount & " times."
Set AcroApp = Nothing
However, when I try to use this same code on a document that opens in a browser window, it doesn't find a document (I threw an Else into the If statement to report to me if there was no active document). How can I get the script to see the PDF in the browser window?
Again, this is just a small test sample. I am aware that there are other methods of searching text, but the ultimate goal is to do much more than just search text.
Thanks in advance for your time.