This repository contains examples that illustrates how to find and replace text in Word documents programmatically in Java using Syncfusion’s Java Word library (Essential DocIO) without Microsoft Word or Office interop dependencies.
The Syncfusion Java Word library (Essential 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. It allows you to save the resultant document as Word document (DOCX, WordML), HTML, RTF.
You can download the jars from the Syncfusion maven repository to use our artifacts in your projects. It helps you to use the Syncfusion Java packages without installing Essential Studio or platform installation to development with Syncfusion controls.
-
Find and highlight text in Java - Find text from a Word document and format or highlight it.
-
Find and replace text in Java - Find text from a Word document and replace it with another text.
-
Replace text with image in Java - Find a placeholder text from a Word document and replace it with any desired image.
-
Replace text with merge field in Java - Find a pattern of text from a Word document and replace it with merge fields.
-
Replace text with table in Java - Find a placeholder text from a Word document and replace it with a table.
-
Replace text with document in Java - Find text from a Word document and replace it with another Word document.
-
Find and replace several paragraphs in Java - Find text that extends to several paragraphs in a Word document and replace it with another Word document.
7 Smart Ways to Find and Replace Text in a Word Document Using Java
Find and highlight text
Find and replace text
Replace text with table
-
Product page: Syncfusion Java Word Framework
-
Documentation: Find and Replace using Syncfusion Java Word library
-
Online demo: Essential DocIO demos
-
Download: Syncfusion File Formats Controls
-
For queries, contact our Syncfusion support team or post the queries through community forums.
-
To renew the subscription, click here or contact our sales team at [email protected].
This 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. You can purchase a license here or start a free 30-day trial here.