Skip to content

Instantly share code, notes, and snippets.

View glasmasin's full-sized avatar

Tom glasmasin

View GitHub Profile
@glasmasin
glasmasin / gist:6737584
Last active July 25, 2018 14:04
Google Apps Script to use mail merge the old fashioned way - to output merged Documents!
/**
* This script will output a mailmerge of documents.
* All document variables are of the form <<var_name>> (spaces are ok)
* Requires a spreadsheet with two sheets
* The first is the data table, the second has the template url in A1
* and the merged document's title in A2 (optional and can use data variables)
*
* With thanks to:
* drzaus: http://webapps.stackexchange.com/a/47255
* Google Apps Script Tutorial: Simple Mail Merge