Parent file address, in embedded word doc fields is absoluted

旧城冷巷雨未停 提交于 2019-12-04 02:33:25

问题


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:


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



来源:https://stackoverflow.com/questions/48095734/parent-file-address-in-embedded-word-doc-fields-is-absoluted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!