Make Excel Macros That Automate Word Compatible with Office 2010
Question details
Make an Excel macro that opens and writes to Word work for users running Office 2010.
- Product
- Microsoft Excel and Microsoft Word VBA
- Device & OS
- not provided
- Scenario
- An Excel workbook uses the Word 16.0 object library to automate Word, but some users have Office 2010.
- Observed behavior
- The macro fails for Office 2010 users because the referenced Word 16.0 object library is unavailable.
Open the workbook in Excel and identify the procedures that automate Word. Check which Office versions and 32-bit or 64-bit installations the macro must support.
Use late binding for Word automation
Use this approach to avoid requiring the Word 16.0 object library reference when the macro runs.
Late binding creates Word objects at run time instead of relying on a version-specific Word library reference. The macro must still use Word features available in Office 2010, and Word must be installed on the user's computer.
In Excel, press Alt+F11 to open the VBA editor, then select Tools > References. Look for a Microsoft Word 16.0 Object Library reference or a reference marked MISSING.
In the VBA editor, replace Word-specific declarations such as Dim wordApp As Word.Application with Dim wordApp As Object. Change other Word object declarations to Object as well.
Replace New Word.Application with Set wordApp = CreateObject("Word.Application"). For example, after creating the instance, use wordApp.Visible = True, Set wordDoc = wordApp.Documents.Add, and wordDoc.Content.Text = "Example text" to create and write to a document.
Search the VBA code for Word constants such as wdFormatDocumentDefault. Define the required constants in the module using their documented numeric values, or replace them with those values.
In Tools > References, clear the Word library reference after updating the code. Select Debug > Compile VBAProject, then run the macro in Office 2010 and each newer version you support.
Develop against the Word 2010 object library
Use an Office 2010 development environment when you want early binding and its VBA editor features.
Check workbook compatibility with Excel 2010
Use the Compatibility Checker to identify workbook features that may not work as expected in earlier Excel versions.
Work with Excel and Word files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Office files, making migration straightforward. It does not fix Microsoft Office library references, and VBA support and automation behavior should be verified before relying on this macro.

Frequently Asked Questions
Why does the Word 16.0 library reference fail in Office 2010?
Office 2010 uses the Word 14.0 object library rather than Word 16.0. In the VBA editor, select Tools > References to inspect missing or version-specific references.
Does late binding require Word to be installed?
Yes. CreateObject("Word.Application") starts an installed Word application; it does not install Word or provide its features.
Why do Word constants fail after I remove the library reference?
Constants such as wdFormatDocumentDefault are supplied by the Word object library. Define the constants your code needs with their documented numeric values, or use those values directly.
Will Excel's Compatibility Checker validate my macro?
No. Run it from File > Info > Check for Issues > Check Compatibility to review workbook features, but compile and run the VBA code in Office 2010 to test the macro.
Which file format should I use to keep the VBA code?
In Excel, select File > Save As and choose Excel Macro-Enabled Workbook (*.xlsm). A standard XLSX workbook does not retain VBA macros.




