我正在尝试在 Word 文档中组织修订。我显然错过了一些非常基本的东西,因为我不能走得太远。
以下脚本
tell application "Microsoft Word"
set activeDoc to active document
set revCount to count of revisions of activeDoc
set aRev to first item of revisions of activeDoc
set auth to author of aRev
set when to date value of aRev
end tell
生成以下内容:
tell application "Microsoft Word"
get active document
--> active document
count every revision of active document
--> 1275
get item 1 of every revision of active document
--> current application
Result:
error "The variable aRev is not defined." number -2753 from "aRev"
错误发生在“set auth”引用上。我尝试了列表中的各种项目,结果相同。我还从字典中注意到文本范围可以包含修订,但即使范围跨越整个文档,我从它的修订计数中得到零。