For template authors: build a spreadsheet, slide deck or filled-in PDF form from Salesforce data, instead of a Word document. This guide covers what each format supports and how to add it to a solution. Expect about 20 minutes for a first template.

Before you begin

  • Docs Made Easy Pro. Excel, PowerPoint and PDF form templates and output are Pro features, added in Pro v1.9.0. Basic supports Word (.docx) templates only, with Word or PDF output (a regular PDF, not a PDF form). On a Basic license, these templates stop with "Excel merge is not allowed in this basic version" (or PDF or PPT) (DME-LIC-002). See Compare editions.
  • A document solution with the data you need on Gather Data: related objects, or a SOQL query with an alias for Excel. See Choose a data source.
  • A real .xlsx, .pptx or PDF form file, at most 5 MB. Larger template files aren't allowed (DME-DOC-001). An older .xls or .ppt file, or a renamed file, can't be opened (DME-TPL-000).

How it works

Excel, PowerPoint and PDF form templates are added to a solution the same way as Word templates, on the Add Template page. From v1.25, Upload a document accepts "Word, PowerPoint, Excel or Adobe" files in Pro. Also from v1.25, conditional logic, formatting and calculations work in PowerPoint, PDF form and Excel templates, not only Word. The v1.25 notes call this "Pro syntax", but it's the same syntax in both editions.

Build and edit these files in Excel, PowerPoint or your PDF tool before you upload them. The in-app Template Editor edits Word (.docx) templates only. {{Image:…}} tags work in PowerPoint and Excel templates as well as Word (Image).

If you need…UseOutput
A list or table of records to sort or total in a spreadsheetExcel templateXLSX
A branded slide deck, such as an account reviewPowerPoint templatePPTX
An official or regulated form whose layout you can't changePDF form templatePDF Form
A contract, quote or letterWord template, with PDF output if neededDOCX or PDF

Build an Excel template

Excel templates show query results with their own syntax. Write each field as:

&=${{QueryAlias.mergeFieldApiName}}

QueryAlias must match the alias of the query, and the field must be one the query selects.

  1. On Gather Data, create a query with an alias, for example query, filtered to the current record with pv0:

    SELECT Id, LastName, FirstName, Name FROM Contact WHERE Account.Id = '{pv0}'
    
  2. In Excel, add a header row, then one row of fields under it:

    Last NameFirst NameFull Name
    &=${{query.LastName}}&=${{query.FirstName}}&=${{query.Name}}
  3. Save the file as .xlsx and upload it on the solution's Add Template page. Add pv0 under Assign Behaviors > Other Parameter, as in Choose a data source.

  4. Generate from an account. The output has one row per contact of that account.

Full details: Use SOQL query merge fields in Excel templates.

Build a PowerPoint template

  1. In PowerPoint, add merge fields where the data should appear, using the syntax from the Merge Field Helper. See Template syntax basics.
  2. For records in a table, use one table per data set. Tables inside other tables aren't supported in PowerPoint and fail with "Tables inside other tables are not supported in PowerPoint templates" (DME-TPL-000). For nested data, use a Word template: nested tables work only in Word (.docx) templates, from v1.23.1, not in PowerPoint or Excel. See Nested queries in templates.
  3. Save the file as .pptx and upload it on the solution's Add Template page.

Use a PDF form template

  1. Start from a PDF form, a PDF with fillable form fields.
  2. Upload it on the solution's Add Template page. The v1.25 notes call this an "Adobe" file; the Pro v1.9.0 notes call it "PDF Form".
  3. Generate the document. The output format is PDF Form. To combine Word and PDF form templates into one PDF, use MergeDocument (see Merge several templates). The feature overview also lists "PDF form editing", to edit form fields and content before final generation.

Verify it worked

  1. Open a record of the solution's object and generate the document. The merge preview doesn't work for Excel or PowerPoint templates, so check the generated file.
  2. Open the file in Excel, PowerPoint or a PDF reader. Check that every field shows the record's data, and that table rows repeat once per record.

Troubleshooting

SymptomLikely causeFix
"Excel merge is not allowed in this basic version" (or PDF or PPT)Your license is BasicUse a Word template, or upgrade. See DME-LIC-002.
"Tables inside other tables are not supported in PowerPoint templates"A nested table in PowerPointUse separate tables, or a Word template. See DME-TPL-000.
Excel output has no query dataThe alias or field name doesn't match the query, or the &=$ prefix is missingCopy the alias and API names exactly. See SOQL query merge fields in Excel.
"Could not open the file…"An older or renamed fileSave it as a real .xlsx or .pptx. See DME-TPL-000.
"Document is too large to process"The template file is over 5 MBCompress images to bring it under 5 MB. See DME-DOC-001.

Next steps