我目前正在尝试使用简单的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)
我设法使用以下脚本将Pages文档导出到Word: