How can I get the following to work in Pages? I get an error message saying the file can't be opened but if I change the path to a .pages file it works fine.

tell application "Pages"
  open "/tmp/test.docx"
end tell
  • I can open the file using the Pages open file dialog just fine. – Abdullah Jibaly Jul 21 '15 at 3:36
  • It worked okay for me. This also works: do shell script "open -a Pages /path_to/filename.docx" – user3439894 Jul 21 '15 at 4:42

You must log in to answer this question.

Browse other questions tagged .