怎么能让它相对?
我在"WB1.xlsm"
有"E:\Administration\Salary"
。
word文档嵌入在Sheet1
中:( Microsoft Word启用宏的文档对象)
我在嵌入式文字doc中复制并粘贴Cells(2,1)
作为Paste Special
> 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字段以外的字段的字段代码解决方案以及适用于所有字段的宏,请参阅: