我想从 Apple-Script 获取 Word 2011 中活动文档中的选定文本。
谢谢
我试过这个,它有效
tell application "Microsoft Word"
activate
try
set selectedText to content of text object of selection
display dialog selectedText buttons {"OK"}
on error
display dialog "erreur" buttons {"OK"}
end try
end tell
尝试:
tell application "Microsoft Word" to get selection's content