Micro Focus QTP (UFT) Forums
spell checking of web objects - 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: spell checking of web objects (/Thread-spell-checking-of-web-objects)



spell checking of web objects - kriday - 06-28-2013

I have written the following code to test the spell checking

Code:
Set M_Word = CreateObject("Word.Application")
Dim Desc
Set Desc=Description.Create                                                                                                  
Desc("micclass").Value = "Link"
                                                                                                                                                            
Set Total_Links=Browser("SomeName").Page("SomeName").ChildObjects(Desc)
a =Total_Links.Count                                              
For i=0 to a-1
M_Word.WordBasic.filenew                                                                                                        
Link_Name=Total_Links(i).GetROProperty("name")                                                            
M_Word.WordBasic.insert Link_Name                                                                                    
If M_Word.ActiveDocument.Spellingerrors.count>0 then
    Reporter.ReportEvent micPass, "Spelling " , "Spelling Error: " & Link_Name

End if
M_Word.ActiveDocument.Close(False)
next
M_Word.quit
Set M_Word=nothing
when I execute this Iam getting the following error

ActiveX component can't create object: 'Word.Application'

Line (1): "Set M_Word = CreateObject("Word.Application")".

I need help in this. Thanks in advance.[/quote]


RE: spell checking of web objects - basanth27 - 07-02-2013

Do you have MS Word installed on the system?


RE: spell checking of web objects - ssvali - 07-02-2013

Your code is working fine when i executed.

As basanth told check whether MS word is installed on your machine


RE: spell checking of web objects - Staff - 07-05-2013

Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.