cancel
Showing results for 
Search instead for 
Did you mean: 

MailMerge from a collection to a Word document

MadalinaAcsinte
Level 3
Hello everyone,

I want to get the info from a collection and introduce it through MailMerge in a Word document in the background.

Anyone knows how should I do that?

I don't want to connect the document to an Excel or database because I have already the data needed in a collection and I want to use it from there.

Thanks a lot,

------------------------------
Madalina Acsinte
------------------------------
15 REPLIES 15

BenLyons
Staff
Staff
Hi Madalina,

May I ask why you are looking specifically to use Mail Merge?

I ask because you could create a process that sends an email to each recipient in the collection via the Outlook VBO. Either by adding each collection row to a work queue or by looping the collection. (each approach has different benefits)

Thanks

------------------------------
Ben Lyons
Product Consultant
Blue Prism
UK
------------------------------
Ben Lyons Senior Product Specialist - Decipher SS&C Blue Prism UK based

Hi Ben,

In the collection I have all the columns with which I want to replace information in the Word document, and when it's completed with the right info for each pearson, I want to send it throw an email.

Is it possible to do that with MailMerge?

Thanks a lot,

------------------------------
Madalina Acsinte
------------------------------

Hi Madalina,

I'm sorry, I cannot find an existing DX asset/VBO that will enable you to do this immediately. I would recommend creating the steps in an object using the user interface integration (i.e. recreating the manual steps).

I'm sure it would likely be possible to do this programmatically using VBA code (or similar) if you are experienced at this, you could create the necessary code stages in an additional Word VBO.

------------------------------
Ben Lyons
Product Consultant
Blue Prism
UK
------------------------------
Ben Lyons Senior Product Specialist - Decipher SS&C Blue Prism UK based

ewilson
Staff
Staff

Hi @MadalinaAcsinte,

Are you trying to create Word .docxs from scratch using just the Collection data, or do you have an existing Word template (.dotx), with the corresponding merge fields defined in it, that you're trying to create Word .docx's from?

Cheers,​



------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric,

I have a templete with the empty fields that I want to fill with the information from the collection.

Thanks

------------------------------
Madalina Acsinte
------------------------------

Ok. Are you familiar with programming in C# or VB.NET in Code stages? If so, here's a link to a tutorial that lays out the basic process of implementing a MailMerge with Word. The code in step 2.d can be enhanced to use the collection data as input for the merge fields in the template.

https://vivekcek.wordpress.com/2012/08/25/create-a-word-document-from-a-template-using-c-mail-merge/

In the long run I can add your request for MailMerge support in the Word VBO to our enhancement backlog.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

@MadalinaAcsinte,

I created an updated MS Word VBO with a new action called Mail Merge. It takes the following input:
  • A Collection of data to use to populate a new document containing MERGEFIELD definitions
  • A Word Template that contains the MERGEFIELD definitions
  • A string that points to the field in the input data that should be used when saving the newly generated Word document to disk
  • The destination folder where the newly generated documents should be saved
Give it a try and see if it does what you need. If so, I may publish it on the DX.

Cheers,


------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

ewilson
Staff
Staff
Hi @MadalinaAcsinte,

Have you had a chance to review the updated VBO I posted?

Cheers,


------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Eric:  I am a novice business user who wanted to show my boss a proof of concept of how BP could take a collection from excel and using mail merge - merge the collection into a multipage word document.  An enhanced VBO would be great. We have been using this mail merge process for many years.

Mitch

------------------------------
Mitchell Broudy
Sr. Assistant Attorney General
Commonwealth of Virginia
Norfolk, VA 23502 VA
17574089773
------------------------------