Mac Excel和PowerPoint使用VBA和Apple脚本任务复制和粘贴

时间:2019-11-27 17:01:25

标签: excel vba powerpoint

我正在尝试使用ApplescriptTask在mcOs和PowerPoint 2019中执行粘贴 (基于Ron de Bruin的帮助)。常规代码复制和粘贴在mcO中运行非常慢。

此代码在VBA中:

myChartObject.Copy
AppleScriptTask "CopyPasteScript.applescript", "PastePowerpoint", ""

我在特殊文件夹中创建了文件“ CopyPasteScript.applescript” / Users / myusername / Library / Application Scripts / com.microsoft.Excel

on PastePowerpoint()
-- Paste into Powerpoint
tell application "Microsoft PowerPoint" to activate
delay 0.1
tell application "System Events"
tell process "microsoft powerpoint" to keystroke "v" using command down
end tell
end PastePowerpoint

但是它不起作用。你能帮我吗?

谢谢您的帮助

0 个答案:

没有答案