[英]How to check whether the code is successfully unlinked?
oActiveWordDoc.Fields.Unlink
如何检查是否成功解除链接?
从MSDN
用其最新结果替换“字段”集合中的所有字段。
取消链接字段时,当前结果将转换为文本或图形,并且无法再自动更新。 请注意,某些字段(例如XE(索引条目)字段和SEQ(序列)字段)不能取消链接。
所以
With ActiveDocument.Sections(1).Range.Fields
.Unlink
End With
ActiveDocument.Sections(1).Range.Fields(1) = "whatever"
ActiveDocument.Sections(1).Range.Fields(1).update
应该给出错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.