Hi
@Jonathan Pringle,
I haven't investigated it, so I'm not 100% sure. What I can tell you is that the current Code stage creates a document instance, based on the template passed in, and then loops through the merge fields defined in the template (i.e. filed name includes
MERGEFIELD) populating each one with the associated value from the data collection. Once it's covered all the fields, it saves the document to file giving it the name based on the specified merge field. It continues that loop for all the rows in the data collection.
My guess is that you'll want to have a look at the actual
MailMerge object in Word's VBA object model. We didn't actually use that in the action we implemented, but my guess is that it will give you what you're looking for. However, the MailMerge object is based on OLEDB from the looks of it, so you may need to have your input data in a CSV or XLSX that you could then create a connection string for. Hopefully that makes sense?
Cheers,​
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------