内嵌word doc字段中的父文件地址是绝对的 [英] Parent file address, in embedded word doc fields is absoluted
问题描述
如何使其具有相对性?
我在"E:\Administration\Salary"
中有"WB1.xlsm"
.
word文档嵌入在Sheet1
中:(Microsoft Word启用宏的文档对象)
我确实进行了复制&将Cells(2,1)
粘贴为嵌入词doc中的Paste Link
该字段的代码中生成了一个绝对的父文件地址:
LINK Excel.SheetMacroEnabled.12 "E:\Administration\Salary\\WB1.xlsm" "Sheet1!R2C1" \a \f 4 \r \* MERGEFORMAT
因此我无法移动Excel文件.
如何使链接字段中与父文档的application.path
相关的父文件地址? 父文档是Excel工作簿.
LINK字段不能保留相对地址.您可能可以通过设置超链接库来解决此问题,MS错误地将其称为设置相对超链接.参见:
或者,对于适用于除LINK字段以外的其他字段的域代码解决方案以及适用于所有字段的宏,请参见:
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:
这篇关于内嵌word doc字段中的父文件地址是绝对的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!