Basic code for Word automation:
Sub Demo()
'Note: A reference to the Word library must be set, via Tools|References
Dim wdApp As New Word.Application, wdDoc As Word.Document, StrName As String, TmpltNm As String
TmpltNm = "C:\Users\" & Environ("Username") & "\Documents\Resume Report.dotx"
If Dir(TmpltNm) = "" Then Exit Sub
StrName = Split(TmpltNm, ".dotx")(0) & " - " & Format(Now, "YYYYMMDD")
wdApp.Visible = True
Set wdDoc = wdApp.Documents.Add(Template:=TmpltNm, Visible:=True)
With wdDoc
'update the document
'save & close
.SaveAs Filename:=StrName & ".docx", FileFormat:=wdFormatXMLDocument, AddToRecentFiles:=False
' and/or:
.SaveAs Filename:=StrName & ".pdf", FileFormat:=wdFormatPDF, AddToRecentFiles:=False
.Close SaveChanges:=True
End With
Set wdDoc = Nothing: Set wdApp = Nothing
End Sub
Note that the code assumes you're creating a new document from a Word template stored in the user's 'Documents' folder. Change the TmpltNm variable to suit. As coded, the above sub assumes you're saving the document back to the same folder as that template and adding the current date to the filename. Again, change the StrName details to suit (e.g. using a different path and/or a data field rather than the date).