0

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.

Tuberose
  • 434
  • 6
  • 24

1 Answers1

1

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

macropod
  • 12,757
  • 2
  • 9
  • 21
  • Is it possible using `Custom Document Properties` , With add a Text type variable with the path value. and using this Properties value in the fields? – Tuberose Jan 11 '18 at 08:12
  • 1
    No, that is not possible. Using a Document Property requires the use of a DOCPROPERY field within the LINK field, but Word will convert the DOCPROPERY field's to static text immediately the LINK field is updated. – macropod Jan 11 '18 at 12:35