Skip to content

Instantly share code, notes, and snippets.

View psvlwar's full-sized avatar

Mike Intravaia psvlwar

View GitHub Profile
/*
File: Mail Merge.js
Description: This script finds the master page and creates as many pages with that master page as the number of records in a VALID csv file and creates documents by importing csv data
Each page of the document contains data corresponding to a tuple in the csv
-The text and images to import data must be on the master page and not on the first page
-The text to be imported must be enclosed in braces as <<tagname>> and the tag name is the data of first tuple of the csv
-The CSV should be valid i.e. the CSV data must not contain the separator character
-The separator must be defined in the first line of cvs else the default separator will be taken as comma
*/