get_document_from_pack (s, c, t, d)

The get_document_from_pack (s, c, t, d) function returns the fully qualified path to a document in the active Document Pack. The pack is selected using the following attributes:

s is the name of the slot in the Document Pack.

c is the name of the channel. "" indicates the default channel. If the channel is not present, an empty string is returned.

t is the type of the document that should be selected. "" selects the original output of the template, regardless of its type.

d is a Boolean value that indicates whether the document must be taken from the default channel in case the specified channel does not exist.

Examples

get_document_from_pack ("Coverletter", "", "", False)

returns the original (DOC, DOCX, or HTML) result document produced by the template in the Coverletter slot.

 get_document_from_pack ("Coverletter", "", "pdf", False)

returns the PDF alternative for the Coverletter slot.

 get_document_from_pack ("Coverletter", "email", "_xml", True)

returns the AiaDocXML alternative for the Coverletter slot for the email channel. If this channel is not present in the Document Pack, the alternative for the default channel is returned.