Word VBA Macros – Add New Document

Add New Document

This Word VBA Macro will add a new document:

Sub VerySimpleAddNewDoc()
    Documents.Add
End Sub

Add New Document to Variable

This macro will add a new document, assigning it to a variable, and adding text to the document.

'new document assigned to variable, add some text to document
Sub AddNewDoc()
Dim oDoc As Document
    Set oDoc = Documents.Add ' asign new doc to oDoc variable
    'write some text in the new doc  reffering to it using oDoc variable
    oDoc.Range.InsertBefore "https://autovbax.com/"
End Sub