| 01/08/2015 Learn a little more about Java World each day, with www.Planet-Source-Code.com's Code of the Day! Current # of subscribers: 10,357 |
Make 9 cents to $300 per game playing Dollar Candy. The better you get, the more you make. Click for more info.
=================================================================
Would you like access to thousands of lines of source code instantly from your desktop? Then check out the Planet Source Code CD...hundreds of amazing programs at your fingertips with no online wait!
Click Here!
Code of the Day: (What is the code of the day? )
1) How to Find & Highlight a Specific Word or Phrase inside a Document using Java
Submissions Since Yesterday:
2) How to Find & Highlight a Specific Word or Phrase inside a Document using Java
1)How to Find & Highlight a Specific Word or Phrase inside a Document using Java
Category: Miscellaneous
Level: Intermediate
Description: This tutorial describes how java developers can programmatically find and highlight a particular word or a phrase inside a MS Word document using Aspose.Words. It might seem easy at first to just find the string of text in a document and change its formatting, but the main difficulty is that due to formatting, the match string could be spread over several runs of text. Consider the following example. The phrase âHello World!â consists of three different runs, its beginning is italic, middle is bold, while the last part â" regular text. In addition to formatting, any bookmarks in the midd le of text will split it into more runs. This article provides a solution designed to handle the described case â" if necessary it collects the word (or phrase) from several runs, while skipping non-run nodes.
Compatibility: Java (JDK 1.3)
Submitted on 1/7/2015 8:16:00 AM and accessed 34 times.
Back to Top
2)How to Find & Highlight a Specific Word or Phrase inside a Document using Java
Category: Miscellaneous
Level: Intermediate
Description: This tutorial describes how java developers can programmatically find and highlight a particular word or a phrase inside a MS Word document using Aspose.Words. It might seem easy at first to just find the string of text in a document and change its formatting, but the main difficulty is that due to formatting, the match string could be spread over several runs of text. Consider the following example. The phrase âHello World!â consists of three different runs, its beginning is italic, middle is bold, while the last part â" regular text. In addition to formatting, any bookmarks in the middle of text will split it into more runs. This article provides a solution designed to handle the described case â" if necessary it collects the word (or phrase) from several runs, while skipping non-run nodes.
Compatibility: Java (JDK 1.3),Java (JDK 1.4),Java (JDK 1.5)
Submitted on 1/7/2015 8:16:00 AM and accessed 34 times.