stylesheet

The stylesheet function specifies a Style Sheet applied to the result document once the function has been called. This Style Sheet overrides the styles in the result document when the document is produced.

 TEXT ignore := stylesheet ( brand; document type)

The result of the function stylesheet is of type TEXT.

This function has two parameters:

  1. brand, type TEXT: The name of the Brand directory from where the Style Sheet should be taken from. An empty string maps to the No Brand folder.
  2. document type, type TEXT: The name of the Document Type directory from where the Style Sheet should be taken from. An empty string maps to the Style Sheet defined directly in the indicated Brand directory.

In combination, these parameters identify a folder in KCM Designer. The "Word Style Sheet" document in this folder defines the paragraph styles for the output document.

The result of the function stylesheet is of type TEXT. It is currently undefined and should be ignored.

This function affects only the Word styling. To control the styling of all supported output formats, use the DOCUMENTSTYLE statement.

The function stylesheet has the following effect on result documents:

  • The result document uses the Style Sheet that was specified when the Master Template was finished.
  • Documents produced with the put_in_document function (see put_in_document) and put_buffer_in_document function (see put_buffer_in_document) use the Style Sheet that was last to be specified before the function was called.
  • Documents produced with the add_to_output function (see add_to_output) use the Style Sheet that was last to be specified before the first add_to_output function was called to create the result document.

An example is provided here.

# BEGIN

TEXT ignore := stylesheet ("Insurance For Life"; "Invoice")
TEXT path := put_in_document ("invoice.doc"; path; "Y"; "N"; "N")
ASSIGN ignore := stylesheet ("Insurance For Life"; "Policy")

END #