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

how do you parameterize search button from the website? the page is a single winobject and i have made a virtual object button of search button but search box can't be converted into a winedit and if we try to convert it into winedit the value we enter in a searchbox appears as numbers in the script so we arent able to parameterize.help!!!

0 Answers   TCS,


1.what is test automation life cycle?

1 Answers   IBM,


How u call functions in QTP Function to calculate the length of characters in a word -

5 Answers  


can any body clearly explain about hybridframework with the explanation for files what ever we come acros in this frame work?

4 Answers   Wipro,


Which Databases supports for QTP?

3 Answers   CTS,


What is the exact difference bet function and action in QTP Anybody can explain it in detail..Thanks in advance..

12 Answers   Wipro,


After the execution of a script how do u upload the results to Quality Center. Pls anyone explain in detail. It is very urgent._______Thanks a lot!!

2 Answers   ABC,


Can we install QTP on remote server and access it as a web application on other system (client place)? If so please let me know. Thanks in advance, Ravi

2 Answers  


Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks

0 Answers  


how u track bugs using Test director in manual testing.

2 Answers   Accenture, FCG,


HOW TO DO THE BATCH TESTING USING QTP?

2 Answers   Ordain Solutions,


1. In build1 there is a page with two check boxes and a submit button. You have prepared a script for that page and its working fine. In Build 2 the developers have added two checkboxes in the page. Will the script prepared for Build 1 work for Build 2 or not. If yes, why and if No, why. Remember the developers have not touched the object properties of the textboxes in the page.

3 Answers   ADP,


Categories