Is it possible for QTP to capture the objects in word
document.If so please give me the code.Thank you.

Answer Posted / nath .t

Dim Word, Doc, Uncorrected, Corrected
Const wdDialogToolsSpellingAndGrammar = 828
Const wdDoNotSaveChanges = 0

Uncorrected = "Helllo world!"
Set Word = CreateObject("Word.Application")
Set Doc = Word.Documents.Add
Word.Selection.Text = Uncorrected
Word.Dialogs(wdDialogToolsSpellingAndGrammar).Show

If Len(Word.Selection.Text) <> 1 Then
Corrected = Word.Selection.Text
Else
Corrected = Uncorrected
End If
msgbox corrected
Doc.Close wdDoNotSaveChanges
Word.Quit

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?

568


How many types of recording modes in qtp?

583


What is the recovery scenario in qtp?

566


What is the purpose of loading qtp add-ins?

621


What are the recording modes in qtp?

579






how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps

1671


Where is the Bitmap checkpoint information stored?

1758


What is keyword driven framework?

616


What is synchronization point in QTP?

670


Explain the Different types of QTP test assets and their extensions?

603


in a web page How to check and display a particular word from a paragraph?

2037


What is the basic concept of quicktest professional (qtp)?

577


what is the diff b/w assistive and mandatary rules of object repository in QTP???

1604


What are the 3 main stages involved in testing with qtp?

555


What are the key points to create a framework in QTP for oracle forms?

1807