Using Templates in Document Creation

The ability to create a Numbers document using a specific template is enabled by the inclusion of the document template property of the document class.  (⬇ see below ) 

The Numbers Suite Document Class

document : The Numbers document. syn spreadsheet

elements

contains sheets; contained by application.

properties

active sheet (sheet ) : The active sheet in the document.

document template (template, r/o) : The template assigned to the document. This property’s value can be set during document creation.

The value of the document template property  (⬆ see above )  is the template currently used (or to be used) by the document in the display of its contents.

NOTE: The document template property is currently read only (except when used with the make command) and cannot be used to change the current template of a Numbers document.

The script below demonstrates the use of the make command to create a new document with a template chosen by the script user:

The following script, a variation of the previous script, creates a new Numbers document using the application template chosen by the script user:

The following script is designed to create a new Numbers document using a specific user template. If the user template is not installed on the computer running the script, the script will prompt the script user to download the specified user template from the company website, and will display the company-hosted website page containing the template if the user desires.

TOP | CONTINUE