VOOZH about

URL: https://www.syncfusion.com/document-sdk/net-word-library/find-and-replace

โ‡ฑ Find and Replace | .NET Word Library | Syncfusion


Bold BIยฎUnlock stunning dashboards with Bold BIยฎ โ€” 35+ widgets, 150+ data sources, AI agent & more.

Try it for free!
Find anything about our product, documentation, and more.

๐Ÿ‘ Syncfusion Feedback

.NET Word Library - Find and Replace in Word Documents using C#

  • Effortlessly find and replace text in Word documents with C#.
  • Advanced options: Replace text with document elements or content from another document.
  • Find document elements like images, charts, and fields based on element properties.

Try C# Word Examples in Playground app.

FREE TRIAL

No credit card required.

Explore Examples

No credit card required.

Trusted by the worldโ€™s leading companies

.NET word library find and replace

Overview

Streamline your Word document editing with the Syncfusion .NET Word Library. By using C#, you can find and replace text with dynamic elements, including images, hyperlinks, paragraphs, tables, or even an entire document. This functionality operates without Microsoft Word or interop dependencies. Refine your searches by using options for case-sensitivity and whole-word matches.

Find and replace in Word document using C#

This example code shows how to find and replace text in a Word document using the Syncfusion .NET Word Library with just a few lines of C# code.

Key features of the Find functionality

Find text

Find text in a Word document based on a specific pattern using a regular expression (regex) or a normal string. You can search the entire document or within a specific paragraph.

Casing and whole words

Refine the find operation by matching the casing or whole word for precise results.

Find first

Find only the first occurrence of a piece of text in a Word document.

Find all

Find all the occurrences of a text length in all parts of a Word document, including the body, header, footer, shapes, comments, footnotes, and endnotes.

Find next

Find the next occurrence of a specified text in a Word document.

Find multiline text

Find the first or next occurrence of a text that extends across several paragraphs.

Features of the Replace functionality

Replace text

Perform a find and replace operation for the text in a Word document and track the total number of replacements made. You can find a static text or specific pattern using a regular expression (regex).

Replace first

Replace only the first occurrence of the specified text in a Word document.

Replace with document

Replace the searched text with document elements such as paragraphs, tables, and content controls while maintaining the source formatting.

Replace with document elements

Replace the searched text with document elements such as paragraphs, tables, and content controls while maintaining the source formatting.

Replace with selection

Find and retrieve text with formatting (bold, highlight) for replacement in occurrences of other placeholders in a Word document, maintaining that formatting.

Replace multiline text

Replace all text occurrences spanning multiple paragraphs with the replacement text or document elements.

Features of Find elements

Find the element by properties

Locate the first Word document element that matches a specified property or a collection of properties. For example, find a picture by its alternative text or a chart by its title and type.

Find all elements by properties

Find all elements that match a specified property or a collection of properties. For example, find all fields of a specific type or all content controls with a specific title and tag.

Explore find and replace references

Check our blog and knowledge base articles to improve your efficiency with find and replace functionalities in Word documents.

๐Ÿ‘ Explore 7 Useful Ways to Find and Replace Text in Word Documents

Blog

Explore 7 Useful Ways to Find and Replace Text in Word Documents Using C#

๐Ÿ‘ Find and replace text with a hyperlink in Word documents using C#

Knowledge base

How to find and replace text with a hyperlink in Word documents using C#

๐Ÿ‘ Find and replace text with a chart in a Word document

Knowledge base

How to find and replace text with a chart in a Word document

๐Ÿ‘ Find and replace text with a Table of Contents (TOC) in a Word document

Knowledge base

How to find and replace text with a Table of Contents (TOC) in a Word document

๐Ÿ‘ Replace text in a Word document with HTML using C#

Knowledge base

How to replace text in a Word document with HTML using C#

๐Ÿ‘ Find and replace text inside a table in a Word document

Knowledge base

How to find and replace text inside a table in a Word document

Syncfusion .NET Word Library Resources

Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.

Frequently Asked Questions

Yes, you can customize the find functionality in the .NET Word library to search the text based on criteria such as case sensitivity and whole-word matching.

Yes. Besides finding and highlighting, you can format the found text with options such as bold, underline, font size, and more.

Yes, like finding text in a Word document, the .NET Word Library offers options to find Word document elements based on their properties.

Yes, you can replace text with Word document elements such as images, hyperlinks, tables, and more.

Yes, using the .NET Word Library, you can find and replace text in a specific paragraph.

You can access it through the Syncfusion.DocIO.Net.Core NuGet package. The documentation provides detailed code samples, facilitating seamless integration.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusionยฎ reduces customersโ€™ development time.
Here are some of their experiences.
What a Dealโ€ฆ.Syncfusion Essential Studio.
With very few lines of code I can generate Excel, Word or PDFs. I can customize the look and feel of the CRUD presentation easily. I am looking forward to trying out the other control suites that Syncfusion provides.
Ibrahim M,
Contractor and CEO
Syncfusion Essential Studio Review
We use Syncfusion Essential Studio for RAD purpose. It has been used for Blazor and .NET Core Razor UI implementations. It really saved time on Web UI development. Additionally PDF & EXCEL components saved time in back-end development as well.
Jaish Mathews,
Chief Applications Architect

See Real Success Stories

Developers around the world trust Syncfusionโ€™s Essential Studio to simplify complex projects and speed up delivery. With a vast library of UI controls, powerful SDKs, and reliable support, Essential Studio helps teams build enterprise-ready applications with confidence.

Read Our Customer Stories

Industry

Software development


75% Cost reduction

50% Faster development

๐Ÿ‘ Customer review

โ€œIf somebody is looking for a great tool to work with? Yes. I would definitely recommend Syncfusion for anyone who is trying to develop something meaningful.โ€

- Somnath Maji (Founder of Igniatek Consultancy)

Read Story

Industry

Utilities (oil and gas)


๐Ÿ‘ 450+ hours saved

450+ hours saved

Streamlined processes and hours of development effort saved.

๐Ÿ‘ Flexible features

Advanced, flexible features

Empowered users through robust and versatile functionality.

๐Ÿ‘ Customer review

โ€œSyncfusionโ€™s tools have taken care of many things so I can focus on developing the application, instead of developing tools for the application.โ€

- James Athyal (Software developer, McDaniel & Associates Consultants Ltd)

Read Story

Industry

Software and technology


๐Ÿ‘ Time saving

1000+ of hours saved

Accelerated development with enterprise-ready UI components.

๐Ÿ‘ File management

Efficient file management

Streamlined workflows with document libraries without building them from scratch.

๐Ÿ‘ Customer review

โ€œWe really love when the magic happens.โ€

- Irvin Dominin (BUILDER WEB Development Manager at Sistemi)

Read Story

Industry

Software and technology


๐Ÿ‘ Time saving

2 Years of delay avoided

Two years of delays prevented with proactive planning.

๐Ÿ‘ On-time delivery

On-time delivery

Projects delivered on schedule using trusted controls.

๐Ÿ‘ Customer review

โ€œWe are Syncfusion fans because of the way Syncfusion treats the support.โ€

- Dr. Howard Rybko (CEO of Synchrony Digital)

Read Story

Industry

IT services and IT consulting


๐Ÿ‘ Improved performance

Improved performance

Large datasets handled with easy customization and quick debugging.

๐Ÿ‘ Highly customizable

Highly customizable

Plug-and-play controls with quick template integration.

๐Ÿ‘ Customer review

โ€œI will surely recommend Syncfusion to others as a third-party control because I think itโ€™s very easily customizable.โ€

- Jayesh (Technical Team Lead, Capita)

Read Story

Industry

Professional services


๐Ÿ‘ Instant access

Instant access

Quick availability of features and resources.

๐Ÿ‘ Reduced dependencies

Reduced dependencies

Fewer dependencies for faster development.

๐Ÿ‘ Customer review

โ€œWe definitely wanted Syncfusion to help us with our document processing functionality, and we were happy with and satisfied with Syncfusion.โ€

- Arvind Naik (Engineering Lead, Vialto Partners)

Read Story
๏ปฟ

Rated by users across the globe

Want to create, View, and edit Word documents in C# or VB.NET?

Start a free 30-day evaluation today!
DOWNLOAD FREE TRIAL

No credit card required.

๐Ÿ‘ Mobile Free Evaluation Section

Awards

Greatnessโ€”itโ€™s one thing to say you have it, but it means more when others recognize it. Syncfusionยฎ is proud to hold the following industry awards.

๐Ÿ‘ Scroll up icon
EXPLORE OUR PRODUCTS
FREE TOOLS
RESOURCES
GET PRODUCTS
UI Kits
SUPPORT
LEARNING
WHY WE STAND OUT
COMPANY
CONTACT US

CONTACT US

  • Fax: +1 919.573.0306
  • US: +1 919.481.1974
  • UK: +44 20 7084 6215
  • Toll Free (USA):
  • 1-888-9DOTNET