{"id":23060817,"url":"https://github.com/syncfusionexamples/word-find-and-replace-examples","last_synced_at":"2025-07-23T17:33:15.030Z","repository":{"id":98096323,"uuid":"238163213","full_name":"SyncfusionExamples/Word-Find-and-Replace-Examples","owner":"SyncfusionExamples","description":"Find and replace text in a Word document in C# and VB.NET without Microsoft Word or interop.","archived":false,"fork":false,"pushed_at":"2024-12-03T10:29:35.000Z","size":1181,"stargazers_count":14,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T11:02:11.694Z","etag":null,"topics":["docio","find-and-highlight-text","find-and-replace","find-and-replace-api","find-and-replace-text","find-several-paragraphs","replace-several-paragraphs","replace-text-with-image","replace-text-with-merge-field","replace-text-with-table","syncfusion","word-find-and-replace-text","word-interop","word-library"],"latest_commit_sha":null,"homepage":"https://www.syncfusion.com/word-framework/net/word-library","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":"2020-02-04T09:00:27.000Z","updated_at":"2024-12-03T10:27:25.000Z","dependencies_parsed_at":"2023-05-23T16:15:44.031Z","dependency_job_id":"c1e05219-e0c6-4dba-8f13-03b358508bd6","html_url":"https://github.com/SyncfusionExamples/Word-Find-and-Replace-Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SyncfusionExamples/Word-Find-and-Replace-Examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FWord-Find-and-Replace-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FWord-Find-and-Replace-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FWord-Find-and-Replace-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FWord-Find-and-Replace-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyncfusionExamples","download_url":"https://codeload.github.com/SyncfusionExamples/Word-Find-and-Replace-Examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FWord-Find-and-Replace-Examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266720044,"owners_count":23973885,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docio","find-and-highlight-text","find-and-replace","find-and-replace-api","find-and-replace-text","find-several-paragraphs","replace-several-paragraphs","replace-text-with-image","replace-text-with-merge-field","replace-text-with-table","syncfusion","word-find-and-replace-text","word-interop","word-library"],"created_at":"2024-12-16T03:15:21.943Z","updated_at":"2025-07-23T17:33:15.010Z","avatar_url":"https://github.com/SyncfusionExamples.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Word Find and Replace examples\n\nThis repository contains examples that illustrates how to find and replace text in Word documents programmatically in C# and VB.NET using Syncfusion\u0026reg; [.NET Word library](https://www.syncfusion.com/document-processing/word-framework/net/word-library?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) (DocIO) without Microsoft Word or Office interop dependencies.\n\n## Find and replace text in Word documents using C#\nThe Syncfusion\u0026reg; [.NET Word library](https://www.syncfusion.com/document-processing/word-framework/net/word-library?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) (DocIO) provides comprehensive APIs to find and replace text in a Word document with any desired text, image, hyperlink, paragraph, table, and part of a document or an entire document. It provides options to find text by matching case and whole words. You can find each occurrence one by one or all the occurrences of a text in the document. It saves your efforts and time by helping you to automate find and replace a pattern of text in a Word document using [Regex](https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples). It allows you to save the resultant document as Word document (DOCX, WordML), PDF, image, HTML and more.\n\n## Key Features\n\n- [Find and highlight text in C#](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#find-text-in-a-word-document-and-format) - Find text from a Word document and format or highlight it.\n- [Find and replace text in C#](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#find-and-replace-text-with-other-text) - Find text from a Word document and replace it with another text.\n- [Replace text with image in C#](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#find-and-replace-text-with-an-image) - Find a placeholder text from a Word document and replace it with any desired image.\n- [Replace text with merge field in C#](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#find-and-replace-a-pattern-of-text-with-a-merge-field) - Find a pattern of text from a Word document and replace it with merge fields.\n- [Replace text with table in C#](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#find-and-replace-text-with-a-table) - Find a placeholder text from a Word document and replace it with a table.\n- [Replace text with document in C#](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#find-and-replace-text-in-word-document-with-another-document) - Find text from a Word document and replace it with another Word document.\n- [Find and replace several paragraphs in C#](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#find-and-replace-text-extending-to-several-paragraphs) - Find text that extends to several paragraphs in a Word document and replace it with another Word document.\n\n## Screenshots\n\n**Find and highlight text**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Find-and-highlight-text/Images/Find-and-highlight-text.png\" alt=\"Find text from a Word document and format or highlight it in C#\"/\u003e \n\u003c/p\u003e\n\n**Find and replace text**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Find-and-replace-text/Images/Replace-misspelt-word.png\" alt=\"Find a misspelt word from a Word document and replace it with desired word in C#\"/\u003e \n\u003c/p\u003e\n\n**Replace text with table**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"Replace-text-with-table/Images/Replace-text-with-table.png\" alt=\"Find text from a Word document and replace it with a table 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-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-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-docio-examples), [merge](https://help.syncfusion.com/file-formats/docio/word-document/merging-word-documents?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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-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-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-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-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-docio-examples) and [Image](https://help.syncfusion.com/file-formats/docio/word-to-image?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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-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-docio-examples#macros), DOTM, [DOCX](https://help.syncfusion.com/file-formats/docio/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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-docio-examples#templates), [HTML](https://help.syncfusion.com/file-formats/docio/html?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), [RTF](https://help.syncfusion.com/file-formats/docio/rtf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), [TXT](https://help.syncfusion.com/file-formats/docio/text?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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-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-docio-examples), [Image](https://help.syncfusion.com/file-formats/docio/word-to-image?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), and [ODT](https://help.syncfusion.com/file-formats/docio/word-to-odt?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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## 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-docio-examples)\n- **Documentation:** [Find and Replace in Word document](https://help.syncfusion.com/file-formats/docio/working-with-find-and-replace?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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-docio-examples)\n- **Online demo:** [Syncfusion\u0026reg; Word library - Online demos](https://ej2.syncfusion.com/aspnetcore/Word/SalesInvoice#/material3?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples)\n\n## Support and feedback\n- For any other queries, reach our [Syncfusion\u0026reg; support team](https://support.syncfusion.com/agent/tickets/create?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) or post the queries through the [community forums](https://www.syncfusion.com/forums?utm_source=github\u0026utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples).\n- Request new feature through [Syncfusion\u0026reg; feedback portal](https://www.syncfusion.com/feedback/home?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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-docio-examples). You can purchase a licnense [here](https://www.syncfusion.com/sales/products?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=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-docio-examples).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fword-find-and-replace-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncfusionexamples%2Fword-find-and-replace-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fword-find-and-replace-examples/lists"}