Search here for all the info you want in this Blog

How to create a Word document from within a test script


Creating a Microsoft Word document
Note:
Microsoft Word must be installed on the machine.
Example:
Dim objWD
' Create the Word Object
Set objWD = CreateObject("Word.Application")
' Create a new document
objWD.Documents.Add
' Add text to the document
objWD.Selection.TypeText "This is some text." & Chr(13) & "This is some more text"
' Save the document
objWD.ActiveDocument.SaveAs "c:\temp\mydoc.doc"
' Quit Word
objWD.Quit
' Release the Word object
Set objWD = Nothing

No comments:

Post a Comment