Saving Documents

Scripts use the save command, from the Standard Suite, to save Keynote documents to files on disk.

save  : Save a document.

save specifier : The document(s) to save.

[ in file reference ] : The file in which to save the document.

[ as Keynote ] : The file format to use.

To save a document with a specific name and location, include the optional in parameter with the save command, and follow the parameter with a reference to the file to be created. This reference can be in an HFS file format or UNIX POSIX path format. Be sure to include the file extension “key” with the file name.

save document 1 in file "Macintosh HD:Users:Johnny:Desktop:Report.key"

save document 1 in "/Users/Johnny/Desktop/Report.key"

Examples for exporting saved Keynote documents in other formats, such as PDF, Microsoft PowerPoint, or HTML, are detailed in the Exporting Documents page.

TIP: The script above uses the path to command to generate a disk reference to a standard user folder. Enumerations for other standard path to command locations include: documents folder/‌downloads folder/home folder/movies folder/music folder/‌pictures folder/public folder/temporary items/shared documents. For more information, view the path to command in the Standard Additions scripting dictionary.

IMPORTANT TIP: Learn how to save and run your favorite scripts using the system-wide Script Menu.

TOP | CONTINUE