VBA & Macro Problems

Fix Excel Object Reference and Word.Document Save Errors

Natalie TaylorNatalie Taylor Nov 20, 2026 868 views

Question details

Troubleshoot save errors in an encrypted legacy Excel workbook and determine how its macros affect format conversion.

Fix Excel Object Reference and Word.Document Save Errors
Product
Microsoft Excel and Microsoft Word
Device & OS
not provided
Scenario
An encrypted Excel 97–2003 workbook is opened from a USB drive and saved or converted to a newer format.
Observed behavior
Saving produces object reference or Word.Document errors, while conversion warns about VBA and Excel 4.0 macros.
Before you start

Close the workbook and copy the XLS file from the USB drive to a local folder for testing. Make sure you have its password and can identify any workbook features that depend on macros.

Solution 1Recommended

Inspect VBA references and test a macro-enabled copy

Use this approach when the workbook's macros may be needed and you want to investigate the Word-related error without immediately removing them.

1
Open the local copy

In Excel, select File > Open and open the local XLS copy. Enter the password if prompted.

2
Inspect the VBA project

Press Alt+F11 to open the Visual Basic Editor. Select Tools > References and look for references marked MISSING, especially references to Word or other libraries.

3
Investigate the failing code

If an error dialog offers Debug, select it and inspect the highlighted line. Check that any Word document object is initialized and that the target save path is accessible before the code uses it.

4
Test an XLSM copy

Return to Excel and select File > Save As. Choose Excel Macro-Enabled Workbook (*.xlsm), use a new file name, and review any conversion warnings before proceeding.

5
Verify workbook functions

Reopen the XLSM copy and test the affected save operation and any required macros. Check whether Excel 4.0 macro sheets and other legacy features survived conversion.

Inspect VBA references and test a macro-enabled copy
Conversion may not resolve the error: The error may come from a missing reference, the macro code, Word automation, or the save path. An XLSM copy retains VBA, but legacy features should be tested separately.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing compatible spreadsheets. It can help you move everyday spreadsheet work from Microsoft Office, but it does not repair Excel VBA references or Word automation errors.

Open and edit compatible Excel XLS and XLSX filesReview spreadsheet data in a familiar workbook interfaceUse a free, lightweight office suite for everyday documentsMove compatible files between WPS Office and Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why does an Excel workbook show a Word.Document error?

A workbook macro may automate Word and use a Word.Document object. In the Visual Basic Editor, check Tools > References for missing libraries and use Debug, if offered, to inspect the failing code.

Which format should I use if I need to keep VBA macros?

Use File > Save As and select Excel Macro-Enabled Workbook (*.xlsm). Review conversion warnings and test the macros and any Excel 4.0 macro sheets after reopening the file.

Will saving as XLSX remove the macros?

An XLSX workbook cannot retain VBA macros, and legacy macro features may also be removed. Review Excel's warning and save under a new name so you can compare it with the original.

How can I open the Visual Basic Editor?

In Excel, press Alt+F11. Alternatively, enable the Developer tab through File > Options > Customize Ribbon, then select Developer > Visual Basic.

Can WPS Office fix the Excel VBA or Word automation error?

WPS Office is an alternative for working with compatible spreadsheet files, but it does not repair Microsoft Excel VBA references or Word automation errors. Investigate those in Excel's Visual Basic Editor.