Sunday, July 20, 2008

To open a word doc,type something and save the doc and close

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