Fix Excel Object Reference and Word.Document Save Errors
Question details
Troubleshoot save errors in an encrypted legacy Excel workbook and determine how its macros affect format conversion.

- 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.
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.
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.
In Excel, select File > Open and open the local XLS copy. Enter the password if prompted.
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.
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.
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.
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.

Test a macro-free XLSX copy
Use this option if you do not need the workbook's macros or want to determine whether they contribute to the save problem.
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.

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.




