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.
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:
Alternatively, for a field code solution that works with fields other than LINK fields, and a macro that works with all fields, see:
来源:https://stackoverflow.com/questions/48095734/parent-file-address-in-embedded-word-doc-fields-is-absoluted