找到了!下面是答案:
http://blog.krugazor.eu/2010/01/applescript-batch-saving-to-pdf/
從上面的鏈接列舉了以下:
「基本上,它的作用是模擬鍵盤和點擊允許你做任何事情,用戶將能夠
毫不費力,AppleScript可以使用打印對話框批量保存爲pdf一堆excel文件!「
on open some_items
repeat with this_item in some_items
try
tell application "Microsoft Excel"
activate
open this_item
tell application "System Events" to tell process "Microsoft Excel"
--Bring up print window
keystroke "p" using command down
--Choose "PDF" > "Save as PDF"
click (menu button "PDF" of window 1)
click (menu item 1 of menu of menu button "PDF" of window 1)
delay 2
-- Choose the desktop as save locaton (Command-D)
keystroke "d" using command down
--Save
keystroke "s" using command down
keystroke return
-- wait and close
delay 3
keystroke "w" using command down
end tell
end tell
end try
end repeat
tell application "Finder"
open desktop
end tell
end open
對於後代,你能否包括你認爲對你的答案有用的鏈接的相關部分?這樣,如果鏈接發生故障,更改等,您的答案將不會變得無用。非常感謝。 –