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
SHARE

About அமரகோசம்

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment