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
'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
0 comments:
Post a Comment