AppleScript:获取Microsoft Word当前字体的名称

AppleScript: Get the name of the current font of Microsoft Word

我是Applescript的新手,我想获取Microsoft Word当前字体的名称。我尝试了以下代码:

tell application "Microsoft Word"
    tell selection
        tell font
            name
        end tell
    end tell
end tell

但执行此脚本会打印以下错误消息:

error: "Can't get name of font." number -1728 from name of <<class w137>>

我的代码有什么问题? -1728 和 w137 是什么意思?

这适用于我使用 macOS Big Sur 和 Word 16.34 版

tell application "Microsoft Word"
    set fontUsed to name of font object of selection
end tell