SummaryHow to add a number to a document that increments automatically every time the document is run.
- Create a new custom number field on the object.
- Populate this field with the desired start number (ex. 1).
- Create an Excel template that pulls the number field into a cell (e.g. A1).
- Use Excel logic to increment the value by 1 in another cell (e.g. B1). For example, in cell B1 input: =A1+1
- Make sure both cells are formatted as number cells with no decimals.
- Give the logic cell (e.g. B1) a specific range name (e.g. addingone).
- Associate the Excel template with the Word template and change the page range of the Excel file from "1 / 100" to "0 / 0". This is the Excel-As-Middleware function. Make sure to specify the range of the middleware file to the range name (e.g. addingone).
- Create an Insert-Update that will update the value of the defined number field and use the range name created in step 6 (e.g. <<addingone>>).
The <<addingone>> tag can be used in the output file name as well.