VBScript to format the text in a Word document
File: cw.vbs
Set word = CreateObject("Word.Application")
word.Application.Visible = true
Set doc = word.Documents.Add()

Set wordSelection = word.Selection
wordSelection.Font.Name = "Arial"
wordSelection.Font.Size = "12"
wordSelection.TypeText "We Are Humans!"
wordSelection.TypeText " " & Date()

doc.SaveAs("D:\VBScript\Trial.docx")
doc.Saved = true
word.Quit
Advertisement