Micro Focus QTP (UFT) Forums
Help on ActiveX component can't create object: 'AcroExch.App' - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Help on ActiveX component can't create object: 'AcroExch.App' (/Thread-Help-on-ActiveX-component-can-t-create-object-AcroExch-App)



Help on ActiveX component can't create object: 'AcroExch.App' - AutomationTester2011 - 08-24-2011

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'"
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..


RE: Help on ActiveX component can't create object: 'AcroExch.App' - anil2u - 11-26-2011

The above statements work only when you have Acrobat Reader where you can create and view pdf files not Adobe Reader which is a free sw from adobe to read pdf files.

Do you have Adobe acrobat on your machine?

Thanks
anil