addDocument method

This method creates a new document. The values of Name, FullName, Path property of a new document are empty string.

Defined in

Documents

Syntax

public Document addDocument(String template, boolean asTemplate, boolean visible) throws SymphonyException

Parameters

String template

Specifies the name of the template to be used for the new document. For example, on Microsoft® Windows® , the format is D:\\template.ott. On Linux®, the format is /home/me/template.ots. If the template file does not exists, this method throws an exception. If no template is used, the value of this property is empty string, for example, documents.add("",false,true).

boolean asTemplate

If a template is used, this parameter specifies true to create a new untitled document based on the template, and it specifies false to load the template for editing. If no template is used, both true and false create a new untitled document.

boolean visible

Specifiestrue to open the new document in a visible window or tab, or false to open the new document in invisible mode.

Return Value

document

A Document object that represents the new document.

See examples

Example: addDocument method