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 / feroz

Dim objWord
Dim wrdDoc
set objword = CreateObject("Word.Application")
objword.visible = true
Set wrdDoc = objword.Documents.Add
wrdDoc.Range.InsertBefore "Hi Good Morning!"
wrdDoc.SaveAs "C:\Greetings.doc"
objword.quit
Set objword = nothing

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can any one send me the QTP Basic Coding Samples?

1616


What is the purpose of loading qtp add-ins?

631


What are the challenges you faced during you entire life automation ?

1016


Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....

1439


Define virtual object?

617






What is an expert view and keyword view?

579


What is an optional step in qtp ?

643


how to know no.of mails in our g mail by using vb-script

1786


Which environments does qtp support?

685


How software tester can use constants and variables in scripts?

1697


How many ways we can parameterize data in quicktest professional (qtp)?

593


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

3287


What is the basic concept of qtp?

584


By using QTP can we record any log files written by the application which is in execution?

1489


RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?

2199