Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Sub CreateNewDocument()

Dim objWord As Object

Dim objDoc As Object

' Create a new instance of Word

Set objWord = CreateObject("Word.Application")

' Hide the Word application window

objWord.Visible = False

' Create a new document

Set objDoc = objWord.Documents.Add

' Make the Word application visible

objWord.Visible = True

' Clean up the objects

Set objDoc = Nothing

Set objWord = Nothing

End Sub

You might also like