Skip to main content

Office Templates

Document generation from Office templates.

Overview​

Office Templates allow you to automatically generate Word, Excel, or PowerPoint documents from templates containing bookmarks or merge fields filled with form data.

Benefits​

  • Automation: Automatic document generation
  • Consistency: Standardized document format
  • Time savings: No manual data entry
  • Dynamic: Up-to-date form data

Template Types​

Word Templates​

Using bookmarks to insert data:

  • Simple fields
  • Dynamic tables
  • Images
  • Conditional formatting

Excel Templates​

Filling cells and tables:

  • Spreadsheets
  • Charts
  • Data tables

PowerPoint Templates​

Creating presentations:

  • Dynamic slides
  • Variable content

Configuration​

Create a Word Template​

  1. Create a Word document
  2. Insert bookmarks (Insert β†’ Bookmark)
  3. Name bookmarks according to form fields
  4. Save the template

Bookmark example:

Document_Title
Creation_Date
Manager
Description

Associate the Template with the Form​

In Process Studio:

  1. Open the form
  2. Office Templates tab
  3. Add a new template
  4. Select the template file
  5. Configure options

Bookmarks and Fields​

Simple Bookmarks​

Inserting a field value:

Bookmark: Document_Title
Value: {Form title}

Bookmarks for List Values​

Display localized text:

// Retrieve the localized value
var localizedValue = GetLocalizedListValue("Status", currentLanguage);

Bookmarks for Tables​

Insert a detail table:

Bookmark: Table_Rows
Data: Detail table rows

Document Generation​

Automatic Generation​

During a workflow transition:

// Automatically generate the document
var templateId = "template_id";
var generatedDoc = GenerateOfficeDocument(templateId, documentId);

Manual Generation​

Button in the form:

  • User clicks "Generate document"
  • System generates the file
  • File is added to attachments

Use Cases​

PDF Contract​

Generate a contract with form data:

  • Contracting parties (fields)
  • Terms (text)
  • Signatures (images)
  • Date and reference

Monthly Report​

Excel report with:

  • Statistics (calculations)
  • Data tables
  • Charts

Form Letter​

Personalized Word letter:

  • Header with logo
  • Recipient (directory)
  • Message body (fields)
  • Signature

Best Practices​

  • Test templates: Verify with real data
  • Clear naming: Explicit bookmarks
  • Version management: Version templates
  • PDF format: Convert to PDF for distribution

References​

Tables​

  • OfficeTemplates: Template definitions
  • OfficeTemplateMappings: Bookmark/field mappings