Skip to content
Gallery
Export to Word Pro User Guide
Share
Explore
Setup Guide

icon picker
GenerateWordDoc

This page takes you through how to use the GenerateWordDoc formula.

What is this formula?

The GenerateWordDoc Formula allows you to take data straight from Coda Tables and into word templates. This is really powerful because it allows ease of data entry in Coda to translate into formatted documents in word. Using placeholders tags, this formula allows data from Coda to automatically go into the right place on your document. Additionally, this formula support conditionals to allow you to choose if certain text elements should be displayed or not for each export.

How to use the formula?

This sections takes you past the basic setup of the welcome page and into the specifics of the GenerateWordDoc formula. This example uses the
@Letter Template - No Loops.docx
template shown below.

1. Add data to Coda

Each tag 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 where each row contains the data for one export. 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

2. 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

3. 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

4. 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

5. Try your button!

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

to see another example that uses the GenerateWordDoc formula.
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.