Gallery
Gestalt Psychotherapy
Share
Explore
Materials

icon picker
Export to Word Pack

Generate word docs from a template
The Pack lets you generate a Word doc (.docx) from a template you supply to the formula, replacing placeholder values with data from your Coda doc.
This pack is useful if you need to generate Word docs frequently that use the same format, such as contracts, invoices, and other pre-formatted documents.
Watch the short video below demonstrating how it works, or .
Loading…

Set-up Steps

NOTE: If you want the buttons in this tutorial doc to work for you, you must first copy this doc and start a free trial of the pack.
Copy this doc

1. Install Export to Word Pack

2. Create a template doc

Set up your docx file exactly how you’d like it to look, but rather than putting values in the variable locations, use variable names surrounded by curly braces (ex: {Customer Name})

Sample Template

Loading…

3. Upload template doc to Coda

Create a new table in your Coda doc with a single column and row. Set the column type to “File”. Upload your template doc to that table (see example in ).
Sample Template Table 2

4. Add data to Coda

Each variable that you put in your template doc will need to be replaced by data from your Coda doc. It is recommended to set up a table with a different column for each variable. Then, once your button is set up in the next step, you will be able to loop through each row and generate a word doc for each one.
Sample Data
3

5. Set up “Generate URL” button

Create a new column in your data table called URL with type Link
Create another new column with type Button and select the Generate word doc action
Fill in the required parameters, then click + Add more > Additional options
Add a key-value pair for any variables you put in your template doc, where the “Placeholder” is the name of the variable without curly braces (ex: “Customer Name”) and the “Value” is the column from your data table (or other formula, such as Today()) that you want to replace it with.
Set the “Results Column” to your URL column
Sample Data with "Generate URL" button
3

6. Set up “Open URL” button

Create a new column with type Button and select the Open hyperlink action
Set the “URL” parameter to your URL column
Sample Data with "Open URL" button
3

7. Set up “Download Word Doc” button

Create a new column with type Button and select the Push Buttons action
Select “Generate URL” as the first button to push, then “Open URL” as the second
(Optional) Hide the “Generate URL”, “URL”, and “Open URL” columns
Sample Data with "Download Word Doc" button
3

8. Try your button!

Click the “Download Word Doc” button in one of your rows to download and view the exported Word doc.

Example Doc


Feedback

Support


Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.