Easily Generate Bulk Reports Using Mail Merge in Angular
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (173).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (215)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (132)JavaScript  (220)Microsoft  (118)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (912)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (158)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (147)Chart  (130)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (625)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (505)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (386)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (589)What's new  (331)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Easily Generate Bulk Reports Using Mail Merge in Angular

Easily Generate Bulk Reports Using Mail Merge in Angular

Mail merge is a process of merging data from a data source into a Word document template. You can quickly generate reports like invoices and payroll by performing a mail merge in a batch process. Then, you can save the generated reports in Word, PDF, HTML, and other formats. In this blog, we’ll see how to easily create a Word document template using the Syncfusion Angular Word Processor and perform mail merge on the server side to generate reports.

Angular Word Processor is a user interface web component. It allows you to interactively draft, edit, view, and print Word documents in a web app. It provides all the standard Word processing features, including editing text, formatting contents, resizing images and tables, finding and replacing text, generating tables of content, and more.  It works independently without Microsoft Word or Office interop dependencies.

Note: If you are new to our Angular Word Processor, please refer to its getting started documentation before proceeding.

Create a Word document template using Angular Word Processor

To generate reports, first, we need to create the Word document template. The Angular Word Processor has an intuitive UI to create a Word document template with merge fields in your web app.

The Word Processor displays the list of valid merge fields based on the JSON data we upload. You can upload JSON data using the Choose File option in the top left side of the UI. The mail merge fields list includes the group start and end fields that are required for performing a group mail merge.

You can drag and drop the required fields from the list, and they will be automatically inserted as merge fields in the Word document template. This allows the end user to design a mail merge Word document template in a few minutes.

Now you can draft, edit, and export the mail merge Word document template based on your needs.

Refer to the following GIF image.

Creating a Word Document Template Using the Angular Word Processor
Creating a Word Document Template Using the Angular Word Processor

Preview the results as individual documents for each record

Once the mail merge Word document template is created, you can preview the results for all records with an interactive navigation option.

You can preview the results by choosing the Preview Results option in the Mail Merge dropdown in the toolbar.

Refer to the following image.

Previewing the Generated Word Document Template Using the Angular Word Processor
Previewing the Generated Word Document Template Using the Angular Word Processor

By default, Word Processor will preview the resultant document generated for the first record. You can also preview the report for all records with the page break added after each record.

Refer to the following image. Here, you can see the previous and next buttons available in the title bar for easy navigation between each record, just like in Microsoft Word.

Previewing Mail Merge Results as Individual Documents for Each Record
Previewing Mail Merge Results as Individual Documents for Each Record

You can also save the resultant document for each record as individual files by enabling the Download as individual files checkbox and clicking the Download button in the title bar.

Performing mail merge in Angular Word Processor

The mail merge process in Angular Word Processor involves the following steps:

  1. The JSON data and template document (DOCX file) passes from the client-side Word Processor to the server side.
  2. The mail merge operation is performed on the template document on the server side using the .NET Core mail merge engine.
  3. The final report will be saved in SFDT format and sent back to the client side.
  4. Now, the SFDT-format file of the final report will be opened in the Angular Word processor.

Now, you can generate the final report as a single document with a page break added after each record by choosing the Merge & Finish option in the Mail Merge dropdown in the tool bar.

Refer to the following image which displays the final report after performing a mail merge in the Angular Word Processor.

Generating Reports Using the Mail Merge Feature in the Angular Word Processor
Generating Reports Using the Mail Merge Feature in the Angular Word Processor

Note: Refer to the mail merge feature in Angular Word Processor documentation for more details.

GitHub repository

Also, refer to the complete working example for mail merge in Angular Word Processor on GitHub.

Summary

Thanks for reading! In this blog, we have seen how to quickly generate reports using the mail merge feature in the Syncfusion Angular Word Processor. Try out this feature to generate reports in a batch process with ease and leave your feedback in the comments section below!

Are you already a Syncfusion user? You can download the product setup here. If you’re not yet a Syncfusion user, you can download a 30-day free trial.

You can also contact us through our support forum, support portal, or feedback portal. We are always happy to assist you!

Related blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed