页面导出到Microsoft Word失败,并带有Applescript

问题描述 投票:0回答:1

我目前正在尝试使用简单的applescript脚本将iWork .pages文件导出到Microsoft Word .docx文件。

on run {path, fileName}

tell application "Pages"
set theDoc to open (path & "/" & fileName)

set theDocName to name of theDoc
export theDoc as Microsoft Word to file ((path & "/" & theDocName & ".docx") as text)

close theDoc

end tell
end run

我期望该文档将作为Microsoft Word文档导出,但是我收到以下错误:

Pages got an error: The document “1” could not be exported as “/Users/joshgrimmett/Desktop/pages2docs/in/1”. (6)

applescript iwork applescript-numbers
1个回答
0
投票

我设法使用以下脚本将Pages文档导出到Word:

© www.soinside.com 2019 - 2024. All rights reserved.