I need to add some records (from excel/txt file) inside my MS Word document (word template) by using - Mailings - Select Recipients - Use an existing list option. Could anyone please let me know how we can do this through Pega Robotics automations.
@Chetti Adding data to a Word document and reading from Excel are certainly possible using Robotic automation, however I believe Word can source data directly from an external file natively. The best solution here would be to use the native methods in Word to do this, probably through a Macro. If you wanted the document to remain as/is, this would be the best solution.
If you did want to use Pega Robotic automation to perform a similar function, you wouldn’t trigger that exact function in Pega Robotics, though since Pega Robotics does not interact directly with the Word document UI. Interactions with office documents are done through the interfaces to them. To do this, you would insert bookmarks into your Word document template and load that into the Word connector. Afterwards, the properties for the connector will show each of the bookmarks that you can then set in an automation. You would need to write some logic to read from your Excel file or text file and iterate through it to update the bookmarks of the current Word document. You’d then save it and perform the update for the next record, etc.
You can also use a hybrid approach. For this, you would create a macro using native Office tools that performs the functions you wish, and then invoke that macro from a Word connector.
@Chetti I should mention that it is possible to do this within a script (and technically translate that script to the automation surface). If you were to search other sites for information on how to perform a mail merge using C#, you could certainly apply that into a script to be executed from Pega Robotics.