I am seeking guidance from experts like you. I would like to automate (via a Word Addin using JavaScript) a repetitive task regarding sample ballot production. The process would go like this:
- Take a ,txt file as input. The text file has ballot information
- Process the .txt file into Word "components" w/ named fields
- Build a .docx file with proper formatting applied to the component fields
To make this more concrete here's an example.
1) Text file content looks like this:
2) The desired "component" would look like this:
Office title: Justice of the Supreme Court
Office instructions: Vote for ONE
Candidate name 1: Maria McLaughlin
Candidate party 1: Democratic
Candidate name 2: Kevin Brobson
Candidate party 2: Republican
3) The docx file content would look like this:
Is there anything like a "component" in Word? (e.g. word part, group component?).
Thanks
Bob