08-24-2011, 08:59 PM
(This post was last modified: 08-24-2011, 09:00 PM by AutomationTester2011.)
i am trying to run a piece of code mentioned below in QTP tool and is throwing an error - " ActiveX component can't create object: 'AcroExch.App'"
My System details:
-------------------------------------------------------------
Microsoft Windows XP Professional Version 2002 Service Pack 3
-------------------------------------------------------------
QTP Tool Version: QTP 10.0
================================================
Please guide me what are all the things needs to be installed inorder to run the above script successfully...
I have checked in Registry as well and i could not find "AcroExch.App" and i am not able to proceed further..even tried searching in google but i could not find the proper solution for this..please help me out
Thanks in advance..
Code:
Dim AcroApp, AcroAVDoc
Dim gPDFPath, bReset, nCount
gPDFPath = "D:\abc.pdf"
' ** Initialize Acrobat by creating App object
Set AcroApp = CreateObject( "AcroExch.App" )
' ** show Acrobat
AcroApp.Show()
' ** Set AVDoc object
Set AcroAVDoc = CreateObject( "AcroExch.AVDoc" )
' ** open the PDF
If AcroAVDoc.Open( gPDFPath, "" ) Then
AcroAVDoc.BringToFront()
bReset = True : nCount = 0
Do While AcroAVDoc.FindText( "Search String", True, True, bReset )
bReset = False : nCount = nCount + 1
If Window("Adobe Acrobat").Dialog("Text Not Found").Exist Then
Window("Adobe Acrobat").Dialog("Text Not Found").WinButton("OK").Click
Exit Do
End If
Wait 0, 200
Loop
End If
AcroApp.CloseAllDocs()
AcroApp.Exit()
Print "The word 'Particulars' was found " & nCount & " times."
Set AcroApp = Nothing
My System details:
-------------------------------------------------------------
Microsoft Windows XP Professional Version 2002 Service Pack 3
-------------------------------------------------------------
QTP Tool Version: QTP 10.0
================================================
Please guide me what are all the things needs to be installed inorder to run the above script successfully...
I have checked in Registry as well and i could not find "AcroExch.App" and i am not able to proceed further..even tried searching in google but i could not find the proper solution for this..please help me out
Thanks in advance..