3.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.

Answer Posted / ashish wadhwa

'For TextFile

'Creating a file system object
Dim objFSO

'Creating a text file object
Dim objTextFile

Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile("D:\SampleFile.txt"
,True)

objTextFile.Write("Sample Automation Example of saving text
file"

objTextFile.Close

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does quicktest professional (qtp) is unicode compatible?

538


What is Curd testing?

1884


I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”

586


when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks

1736


Explain calling sub procedure.

624






In qtp, how you can use xpath to identify objects?

618


How will you handle java tree in qtp?

629


What is the differences between image check point and bit map check point?

581


How to remove associated function library?

561


I need to obtain the parent of an object programatically, so if I have: winButton("aButton") I need to obtain the parent part: window("Window1").Dialog("Dialog1") so I can programatically create a string of the full name of the object to call it with an execute statement in QTP I would like to use something like: part[1] = "window(""Window1"")" part[2] = "dialog(""Dialog1"")" so I can do: exeLine = part[1]&"."&part[2]&"."&"winButton(""aButton"")" Execute exeLine Apart from keeping a record of the window/dialog hierarchy is there a parent or path function/ command Thanks Adrian

1574


What is Associate Repository in QTP 9.2 ?

603


Discuss quicktest professional (qtp) environment?

578


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

575


Mention the different actions types of qtp.

575


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

1455