How to Update All Word Cross-References Automatically with a VBA Macro
Question details
The user needs a way to automatically refresh all cross-references, Mendeley citations, and figure or table references in a Word document using a VBA macro, avoiding the need to update them individually.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Managing large documents with multiple automated fields and citations that require frequent updating.
- Observed behavior
- Currently, fields must be updated individually, requiring a lot of manual effort to keep document references accurate.
Ensure that your document is saved and that you have enabled macros in your Trust Center or Macro Security settings before running VBA code.
Use a Print Preview VBA Macro to Force Field Updates
This solution leverages Word's native behavior of updating all fields when entering and exiting Print Preview, ensuring every cross-reference is refreshed.
A highly reliable workaround for updating all fields in a document is to use VBA to simulate opening and closing the Print Preview screen. Word inherently recalculates document fields before printing.
Press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor.
In the Project Explorer pane, locate the 'NewMacros' module inside your Normal project, or right-click 'Modules' and select Insert > Module to create a new one.
Paste the following code into the module window: Sub CRUpdater() With ActiveDocument .PrintPreview .ClosePrintPreview End With End Sub
Save your macro in a trusted document or template. You can now run this macro by pressing F5 or by adding it to your Quick Access Toolbar for one-click access.

Easily Update All Fields and Cross-References in WPS Writer
If you want to avoid dealing with VBA codes, you can instantly update all cross-references, tables of contents, and fields in WPS Writer. WPS Writer provides full support for Microsoft Word document fields natively.
- 1. Open your document: Launch WPS Writer and open the document containing your citations and cross-references.
- 2. Select all document text: Press Ctrl + A on your keyboard to highlight the entire document, ensuring all dynamic fields are selected.
- 3. Update the fields instantly: Right-click anywhere in the highlighted text and select 'Update Field' from the context menu, or simply press the F9 key on your keyboard to refresh all references automatically.

Frequently Asked Questions
Can I add this macro to my Quick Access Toolbar?
Yes. You can use the 'Customize the Quick Access Toolbar' dialog box to add the macro. Select 'Macros' from the 'Choose commands from' dropdown menu, select your newly created macro (e.g., CRUpdater), and click 'Add'.
Why does the macro use Print Preview to update fields?
Entering and exiting Print Preview forces the word processor application to recalculate pagination and refresh all dynamic fields in the document automatically. It serves as a fast and reliable workaround for global field updating in VBA.
Will this macro update my Mendeley citations as well?
Yes, this macro forces the application to refresh all active document fields, which includes Mendeley citations, figure captions, table references, and standard cross-references.
What should I do if my macro is named 'NewMacros.activateTargetDocument'?
'NewMacros' is simply the module name, while 'activateTargetDocument' is the procedure. In the VBA editor, you can change the text 'Sub activateTargetDocument()' to 'Sub CRUpdater()' to give it a more descriptive name.




