在Excel 2016中,以下AppleScript:
tell application "Microsoft Excel"
activate
open "Macintosh HD:Users:path:to:file"
end tell
Run Code Online (Sandbox Code Playgroud)
打开一个对话框,要求用户授予访问权限
使用以前的Excel版本,文件立即打开.似乎微软不允许在没有明确用户许可的情况下从脚本中打开文件.
有没有办法绕过对话框?