{"id":23060801,"url":"https://github.com/syncfusionexamples/mail-merge-examples","last_synced_at":"2025-08-15T08:32:05.296Z","repository":{"id":38062506,"uuid":"201447263","full_name":"SyncfusionExamples/Mail-Merge-Examples","owner":"SyncfusionExamples","description":"Mail merge data to a Word document in C#, VB.NET without Microsoft Word or interop.","archived":false,"fork":false,"pushed_at":"2024-12-03T07:23:21.000Z","size":2919,"stargazers_count":34,"open_issues_count":2,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-03T08:25:25.149Z","etag":null,"topics":["barcode-labels","create-send-email-messages","dot-net-word-library","envelopes","generate-multiple-word-documents","interop","mail-merge","mail-merge-api","mail-merge-csharp","mail-merge-using-excel-spreadsheet","mail-merge-word","mailmerge","microsoft-word","microsoft-word-automation","personalized-letters","product-catalog","syncfusion"],"latest_commit_sha":null,"homepage":"https://www.syncfusion.com/word-framework/net/word-library/mail-merge","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SyncfusionExamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-09T10:35:20.000Z","updated_at":"2024-11-20T16:53:55.000Z","dependencies_parsed_at":"2024-10-21T19:05:47.920Z","dependency_job_id":null,"html_url":"https://github.com/SyncfusionExamples/Mail-Merge-Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FMail-Merge-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FMail-Merge-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FMail-Merge-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FMail-Merge-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyncfusionExamples","download_url":"https://codeload.github.com/SyncfusionExamples/Mail-Merge-Examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229901551,"owners_count":18141741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode-labels","create-send-email-messages","dot-net-word-library","envelopes","generate-multiple-word-documents","interop","mail-merge","mail-merge-api","mail-merge-csharp","mail-merge-using-excel-spreadsheet","mail-merge-word","mailmerge","microsoft-word","microsoft-word-automation","personalized-letters","product-catalog","syncfusion"],"created_at":"2024-12-16T03:15:18.915Z","updated_at":"2024-12-16T03:15:19.354Z","avatar_url":"https://github.com/SyncfusionExamples.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mail merge Examples\n\nThis repository contains examples that illustrates how to mail merge Word documents in C# and VB.NET using Syncfusion’s [.NET Word library](https://www.syncfusion.com/word-framework/net/word-library?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) (Essential\u0026reg; DocIO) without Microsoft Word or Office interop dependencies.\n\n# Mail merge in Word documents\n\nMail merge is a process of merging data (replacing merge fields) from a data source into the template Word document.\n\nThe Syncfusion\u0026reg; [Word library](https://www.syncfusion.com/word-framework/net/word-library?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) (Essential\u0026reg; DocIO) has a powerful [mail merge](https://www.syncfusion.com/word-framework/net/word-library/mail-merge?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) API to generate personalized reports like letters, pre-addressed envelopes, address labels, invoice, payroll, and more. It performs mail merge faster in a batch process without Microsoft Word or Office interop dependencies. The generated reports can be saved as a Word document, PDF, image, HTML, and more.\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Images/Mail-merge-in-Word-library.png\" alt=\"Mail-merge-in-Word-library\"/\u003e \n\u003c/p\u003e\n\n# Key Features\n\n- [Envelopes for mailing in C#](Create-Envelopes-for-mailing/) - Create envelopes for mailings to the list of recipients.\n\n- [Generate multiple Word documents in C#](Generate-multiple-Word-documents/) - Create a batch of personalized letters as individual document for each record.\n\n- [Create and send email messages in C#](Create-and-send-email-messages/) - Create and send email messages by converting merged document to HTML.\n\n- [Personalized letters in C#](Create-personalized-letter/) - Create personalized letters for selected recipient from the mailing list.\n\n- [Order details of a customer in C#](Generate-order-details-of-customer/) - Generate order details of a customer using nested mail merge.\n\n- [Barcode labels in C#](Generate-Barcode-labels/) - Generate a barcode labels for grocery store.\n\n- [Mail merge using Excel Spreadsheet in C#](Group-Mail-merge-using-Excel/) - Import data from Excel Spreadsheet and generate a report.\n\n- [Product catalog in C#](Product-catalog/) - Generate a product catalog and formatting the merged text.\n\n- [Replace merge field with HTML in C#](Replace-Merge-field-with-HTML/) - Replace merge field with HTML string using mail merge.\n\n- [Fit the photo within text box in C#](Fit-photo-within-textbox/) - Fit the photo within the text box in the Word document using mail merge.\n\n- [Start each record on a new page in C#](Start-each-record-on-new-page/) - Generate each record in new page while executing group mail merge.\n\n# Screenshots\n\n**Envelopes for mailing**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Create-Envelopes-for-mailing/Images/Envelopes-for-mailing-output.png\" alt=\"Envelopes-for-mailing in C#\"/\u003e \n\u003c/p\u003e\n\n**Batch of personalized letters**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Generate-multiple-Word-documents/Images/Generate-multiple-Word-documents-output.png\" alt=\"Generate-multiple-Word-documents in C#\"/\u003e \n\u003c/p\u003e\n\n**Barcode labels**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Generate-Barcode-labels/Images/Generate-Barcode-labels-output.png\" alt=\"Barcode-labels in C#\"/\u003e \n\u003c/p\u003e\n\n**Replace merge field with HTML**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Replace-Merge-field-with-HTML/Images/Replace-Merge-field-with-HTML-output.png\" alt=\"Replace-Merge-field-with-HTML in C#\"/\u003e \n\u003c/p\u003e\n\n**Fit photo within text box**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Fit-photo-within-textbox/Images/Fit-photo-within-textbox-output.png\" alt=\"Fit-photo-within-textbox in C#\"/\u003e \n\u003c/p\u003e\n\n**Start each record on a new page**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Start-each-record-on-new-page/Images/Start-each-record-on-new-page-output.png\" alt=\"Start-each-record-on-new-page in C#\"/\u003e \n\u003c/p\u003e\n\n## Syncfusion\u0026reg; .NET Word Library\nThe Syncfusion\u0026reg; DocIO is a [.NET Word library](https://www.syncfusion.com/document-processing/word-framework/net/word-library?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) allows you to add advanced Word document processing functionalities to any .NET application and does not require Microsoft Word application to be installed in the machine. It is a non-UI component that provides a full-fledged document instance model similar to the Microsoft Office COM libraries to iterate with the document elements explicitly and perform necessary manipulation. \n\nTake a moment to peruse the [documentation](https://help.syncfusion.com/file-formats/docio/getting-started?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), where you can find basic Word document processing options along with the features like [mail merge](https://help.syncfusion.com/file-formats/docio/working-with-mail-merge?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), [merge](https://help.syncfusion.com/file-formats/docio/word-document/merging-word-documents?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), [split](https://help.syncfusion.com/file-formats/docio/word-document/split-word-documents?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) and [compare documents](https://help.syncfusion.com/file-formats/docio/word-document/compare-word-documents?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), [find and replace](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) text in the Word document, [protect](https://help.syncfusion.com/file-formats/docio/working-with-security?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) the Word documents, and most importantly, the [PDF](https://help.syncfusion.com/file-formats/docio/word-to-pdf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) and [Image](https://help.syncfusion.com/file-formats/docio/word-to-image?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) conversions with code examples.\n\nCompatible Microsoft Word Versions\n----------------------------------\n\n*   Microsoft Word 97-2003\n*   Microsoft Word 2007\n*   Microsoft Word 2010\n*   Microsoft Word 2013\n*   Microsoft Word 2016\n*   Microsoft Word 2019\n*   Microsoft 365\n\nSupported File Formats\n----------------------\n\n*   Creates, reads, and edits popular text file formats like [DOC](https://help.syncfusion.com/file-formats/docio/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples#doc-to-docx-and-docx-to-doc), DOT, [DOCM](https://help.syncfusion.com/file-formats/docio/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples#macros), DOTM, [DOCX](https://help.syncfusion.com/file-formats/docio/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples#doc-to-docx-and-docx-to-doc), [DOTX](https://help.syncfusion.com/file-formats/docio/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples#templates), [HTML](https://help.syncfusion.com/file-formats/docio/html?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), [RTF](https://help.syncfusion.com/file-formats/docio/rtf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), [TXT](https://help.syncfusion.com/file-formats/docio/text?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), and [XML (WordML)](https://help.syncfusion.com/file-formats/docio/word-file-formats#word-processing-xml-xml?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples).\n*   Converts Word documents also to [PDF](https://help.syncfusion.com/file-formats/docio/word-to-pdf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), [Image](https://help.syncfusion.com/file-formats/docio/word-to-image?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples), and [ODT](https://help.syncfusion.com/file-formats/docio/word-to-odt?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) files.\n\n## How to run the examples\n- Download this project to a location in your disk.\n- Open the solution file using Visual Studio.\n- Rebuild the solution to install the required NuGet packages.\n- Run the application.\n\n\n## Resources\n\n- **Product page:** [Syncfusion\u0026reg; Word Framework](https://www.syncfusion.com/document-processing/word-framework/net?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples)\n- **Documentation:** [Mail merge using Syncfusion\u0026reg; Word library](https://help.syncfusion.com/file-formats/docio/working-with-mail-merge?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples)\n- **GitHub Examples:** [Syncfusion\u0026reg; Word library examples](https://github.com/SyncfusionExamples/DocIO-Examples?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples)\n- **Online demo:** [Syncfusion\u0026reg; Word library - Online demos](https://ej2.syncfusion.com/aspnetcore/DocIO/SalesInvoice?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples)\n\n## Support and feedback\nFor any other queries, reach our [Syncfusion\u0026reg; support team](https://support.syncfusion.com/?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) or post the queries through the [community forums](https://www.syncfusion.com/forums?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples).\n\nRequest new feature through [Syncfusion\u0026reg; feedback portal](https://www.syncfusion.com/feedback?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples).\n\n## License\nThis is a commercial product and requires a paid license for possession or use. Syncfusion's licensed software, including this component, is subject to the terms and conditions of [Syncfusion's EULA](https://www.syncfusion.com/license/studio/22.2.5/syncfusion_essential_studio_eula.pdf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples). You can purchase a licnense [here](https://www.syncfusion.com/sales/products?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples) or start a free 30-day trial [here](https://www.syncfusion.com/account/manage-trials/start-trials?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-github-docio-examples).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fmail-merge-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncfusionexamples%2Fmail-merge-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fmail-merge-examples/lists"}