Wednesday, 28 May 2014

VBScript to reverse a String without using strreverse

Dim myStr, sLen

myStr=InputBox("Enter your string")
sLen = Len(myStr)

for i=1 to sLen
strRev = mid(myStr,i,1)& strRev
Next
MsgBox strRev

How to Create a Word Document in QTP?

Dim oWord

'Initiate the word document object

Set oWord = CreateObject("Word.Application")

'Create new word document
oWord.Documents.Add

'Type some characters in the newly created document
oWord.Selection.TypeText "Dhana Test Text"
 

'Save the document
oWord.ActiveDocument.SaveAs "c:\Dhana\Test.Doc
 

'Close word
oWord.Quit

'Release the object
Set oWord = Nothing

 
Back To Top