Parent file address, in embedded word doc fields is absoluted

275 Views Asked by At

How can made it relative?

I have "WB1.xlsm" in "E:\Administration\Salary".

A word document was embedded in Sheet1: (Microsoft Word Macro-Enabled Document object)

I did Copy & Paste Cells(2,1) in the embedded word doc as Paste Special> Paste Link

There is an absolute parent file address have generated in the field's code:

LINK Excel.SheetMacroEnabled.12 "E:\Administration\Salary\\WB1.xlsm" "Sheet1!R2C1" \a \f 4 \r  \* MERGEFORMAT

So I can't move the Excel file.

How can make the parent file address which is in linked fields, related to the application.path of parent document? parent document is Excel Workbook.

1

There are 1 best solutions below

2
On

LINK fields cannot be made to retain a relative address. You may be able to resolve the issue by setting a hyperlink base, which MS wrongly refers to as setting a relative hyperlink. See:

https://support.microsoft.com/en-au/help/903163/how-to-create-absolute-hyperlinks-and-relative-hyperlinks-in-word-docu

Alternatively, for a field code solution that works with fields other than LINK fields, and a macro that works with all fields, see:

http://windowssecrets.com/forums/showthread.php/154379-Word-Fields-and-Relative-Paths-to-External-Files