VBA & Macro Problems

Make Excel Macros That Automate Word Compatible with Office 2010

Camila MilosovichCamila Milosovich Nov 18, 2026 869 views

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.
Before you start

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.

Solution 1Recommended

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.

1
Inspect the reference

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.

2
Change Word declarations

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.

3
Create the Word instance

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.

4
Replace Word constants

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.

5
Remove the dependency and test

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.

Late binding does not add missing features: Replace any Word or Excel features introduced after Office 2010. If the project calls Windows APIs, also check that its declarations support the target Office bitness.
Free Microsoft Office alternative

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.

Open and edit Microsoft Excel and Word formats, including XLSX, XLSM, and DOCXUse a familiar interface for everyday spreadsheet and document workWork with spreadsheet and document files in one lightweight suiteReview macro-enabled workbooks while assessing whether their automation is supported
microsoft office alternative - wps office

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.