how to record a word doc using qtp i.e open a word doc,type
something and save the doc

can someone send me the code.

Answers were Sorted based on User's Feedback



how to record a word doc using qtp i.e open a word doc,type something and save the doc can some..

Answer / ashok

This did not work. Displayed error " Object doesn't
support th is property or method 'doc.selection'

Can you please also send code for the following:"
Read word doc. Get font. Get Italic. Get Bold.

Is This Answer Correct ?    0 Yes 0 No

how to record a word doc using qtp i.e open a word doc,type something and save the doc can some..

Answer / vijay

Set word = CreateObject("Word.Application")
Set doc = word.documents.Add
word.visible = True
word.selection.typetext " Open MSWord"
doc.saveAs "C:vin.doc"
word.quit
Set word = nothing
Set doc = nothing

Is This Answer Correct ?    0 Yes 1 No

how to record a word doc using qtp i.e open a word doc,type something and save the doc can some..

Answer / chaitu

Dim word
Dim doc

Set word = CreateObject("Word.Application")
Set doc = word.documents.Add
word.visible = True
doc.selection.typetext " Open MSWord"
doc.saveAs "C:\chaitu.doc"
word.quit
Set word = nothing
Set doc = nothing

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More QTP Interview Questions

Will QTP gets installed on virtual PC.What is the maintenance number to be given

1 Answers  


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

0 Answers  


They asked by using qtp recording writing scripting

0 Answers   Wipro,


What is positive test case and Negative Test case? What is the meaning of Real World Scenario's?

2 Answers   TCS,


Hi friends, I have heard that it is required to have an application hosted in the same machine where we use QTP. Otherwise QTP may identify the objects incorrectly. Please clear me is it true.

3 Answers  






What are the Application Functions available in QTP?

0 Answers  


Explain calling sub procedure.

0 Answers  


what are the areas that cannot be tested using an automated tool? list a few

7 Answers  


can u Give Procedure to Handle Pop Window & write Code for that

2 Answers   CTS,


What is the quicktest professional testing process?

0 Answers  


How to resume the second iteration in the QTP,, if the error has intrupted the the second iteration. When i use run from step it starting from the first iteration again.

1 Answers  


Iam doing automation in Oracle App's using QTP? In App's because of some functional setup, keep on changing my script flow. for this how can i use the recovery sceanrio?? Please help me?

1 Answers  


Categories