In Excel I have a few macro's that work perfect. What I do with these macro's is open a Word document (.docx), fill the bookmarks with data from the Excel file, save the separate Word documents with some data in the filename, in a specified folder. No big deal (anymore).
The thing is that the input files are .docx files. The output files are .doc (Word 97-2003 compatible).
How to save the output documents as .docx files? The part of my VBA that is responsible for the saving is this:
wordApp.DisplayAlerts = False
WordDoc.SaveAs Filename:=ThisWorkbook.Path & "GoNoGo\GoNoGo BOL " & strVoornaam & Space(1) & strAchternaam, FileFormat:=wdFormatDocument
WordDoc.Close
wordApp.Quit
Set WordDoc = Nothing
Set wordApp = Nothing
As Object
, which makes VBA resolve the actual types at run-time (hence, late binding, vs compile-time / early binding). – Mathieu Guindon Jul 17 '18 at 19:42