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.
Answers were Sorted based on User's Feedback
Answer / ashish wadhwa
'For Excel
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
'Adding the workbook
Set objWorkbook = objExcel.Workbooks.Add
'Adding the text in the workbook in 1st row and 1st Column
objExcel.Cells(1, 1).Value = "Hi This is me Ashish"
'Saving the excel file
objWorkbook.SaveAs("D:\Sample.xls")
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
Answer / jagdish
'For Excel
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
'Adding the workbook
Set objWorkbook = objExcel.Workbooks.Add
'Adding the text in the workbook in 1st row and 1st Column
objExcel.Cells(1, 1).Value = "Hi This is me Ashish"
'Saving the excel file
objWorkbook.SaveAs("D:\Sample.xls")
| Is This Answer Correct ? | 0 Yes | 0 No |
Can anybody help me by sharing the code for checkbox in qtp using vbscript.
I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all
what is the Debug view?
How to execute a VBS file without using Execute File statement?
What is the file extension of the code file in qtp?
pls help me with scripting,right from the beginning in QTP
What is the difference between "call" and "callclose"
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?
How can we change the .mtr file to .tsr file and vice-versa
1.what is the extension of action template? 2.what are the strengths and weaknesses of Keyword driven framework? 3.how qtp identify runtime objects?
In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer
0 Answers Tavant Technologies,
How you can write contexts to text file in qtp?