logo
search
Document Editing Problems

How to Use Relative Paths for Linked Excel Files in Word

Steve KSteve K Oct 15, 2026 868 views

Question details

The user needs to update the links to Excel files embedded in a Word document after both files are moved to a new folder, specifically without using macros.

How to Use Relative Paths for Linked Excel Files in Word
Product
Word
Device & OS
not provided
Scenario
Moving a Word document and its associated linked Excel files to a new directory or sharing them with another user.
Observed behavior
The linked objects retain their original absolute file paths, causing the links to break or point to the old location rather than adapting to the new relative folder path.
Before you start

Before proceeding, create a backup copy of your Word document to ensure you can restore it if manual field code edits cause formatting errors.

Solution 1Recommended

Manually Update OLE Link Field Codes

Use Word's field code view to manually locate and change the absolute file paths to the new folder location.

Since LINK fields created via the Insert Object function do not automatically convert to relative paths, the most reliable method without macros is to manually update the hidden field codes.

You can use the Find and Replace feature within the field code view to quickly update multiple links pointing to the same directory.

1
Reveal Field Codes

Open your Word document and press 'Alt + F9' (or 'Option + F9' on Mac) to reveal the hidden field codes. Your embedded Excel charts or tables will change into text brackets like { LINK Excel.Sheet.12 "C:\\OldFolder\\File.xlsx" }.

2
Find and Replace the Path

Press 'Ctrl + H' to open the Find and Replace dialog. In the 'Find what' box, enter the old folder path (e.g., C:\\OldFolder\\). In the 'Replace with' box, enter the new folder path. Ensure you use double backslashes (\\) in the paths.

3
Execute the Replacement

Click 'Replace All' to update the directory paths across all linked fields in the document.

4
Hide Codes and Update Links

Press 'Alt + F9' again to hide the field codes and return to the normal view. Press 'Ctrl + A' to select the entire document, then press 'F9' to refresh and update all links with the new paths.

Manually Update OLE Link Field Codes
Field Code Syntax: Be careful not to delete any quotation marks or spaces within the field code brackets, as this will break the link entirely.
Seamless Document Management

Easily Manage Embedded Objects with WPS Office

WPS Writer offers full support for advanced document layout features, including comprehensive field code editing. Easily manage OLE links, update absolute paths, and handle embedded spreadsheets with an intuitive interface.

  1. 1. Open the Document: Launch WPS Writer and open your .docx file containing the embedded Excel links.
  2. 2. Toggle Field Codes: Press 'Alt + F9' to instantly display the hidden link field codes.
  3. 3. Edit the Path: Manually adjust the folder directory paths inside the brackets to match your new folder location.
  4. 4. Refresh Data: Press 'Alt + F9' to hide the codes, then select the document and press 'F9' to fetch the latest Excel data.
Fully compatible with Microsoft Word (.docx) and Excel (.xlsx) formatsEasily toggle and edit field codes using standard keyboard shortcutsLightweight, fast, and free to use for daily document processing
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't Word use relative paths for linked objects automatically?

Word OLE (Object Linking and Embedding) fields default to absolute paths to ensure the linked data remains accessible even if the Word document is moved or saved to a different location independently of the source Excel file.

Can I use standard hyperlinks instead of OLE object links?

Yes, standard hyperlinks (inserted via Ctrl + K) do support relative paths. However, hyperlinks will only open the external Excel file when clicked; they will not display the live Excel data or charts directly on the Word document page.

What happens if I make a mistake editing the field code?

If the syntax or path in the field code is incorrect, the link will break, and Word will display an error message like 'Error! Not a valid link.' instead of the Excel data. You can press Alt + F9 again to find and correct the typo.

How do I check current link paths without showing all field codes?

You can view and manage all external links in your document by going to the 'File' tab, clicking on 'Info', and selecting 'Edit Links to Files' in the bottom right corner. This menu displays the current absolute paths for all linked media.