【发布时间】:2017-05-11 16:28:23
【问题描述】:
试图找出如何在 Macosx 上使用 Microsoft Powerpoint for Mac 2011 版本 14.7.3 在 Mac OS Sierra 上的 pptm 文件中从命令行调用宏,我发现了一些使用 Applescript 的建议。
建议:
tell application "Microsoft PowerPoint"
activate
tell active workbook
run VB macro "myMacroName"
end tell
这对我不起作用。
https://lists.apple.com/archives/applescript-users/2013/Jan/msg00216.html 建议:
osascript << EOF
tell application "Microsoft Powerpoint"
activate
open ":Users:me:folder:macros.pptm"
run VB macro macro name "check" list of parameters {"i", 1}
--quit
end tell
EOF
给出错误信息:
128:187: execution error: „Microsoft PowerPoint“ hat einen Fehler erhalten: Fortfahren nicht möglich: run VB macro. (-1708)
我在 Microsoft Excel 中尝试过同样的方法:
使用以下 bash 脚本:
osascript << EOF
tell application "Microsoft Excel"
activate
open ":Users:me:folder:check.xlsm"
run VB macro "Blatt1.check"
quit
end tell
EOF
哪个有效。
我需要做什么才能使等效的 powerpoint 正常工作?
【问题讨论】:
标签: macos applescript powerpoint