How to replace a string inside of a Word Document?

Let’s learn how to replace a string inside of a Word Document. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

Java: parsing ms-word document using POI/HWPF

I have a ms-word document (MS-Office 2003; non-xml). Within this document there is a string associated with a bookmark. Furthermore, the word document contains word-macros. My goal is to read the document with java, replace the string associated with the bookmark, and save the document back to word format. My first approach was using Apache POI HWPF: HWPFDocument doc = new HWPFDocument(new FileInputStream("Test.doc")); doc.write(new FileOutputStream("Test_generated.doc"));...


never found a solution. The customer had to pay an Aspose-license (expensive) or refrain from using...

Read more

user136200 at Stack Overflow Mark as irrelevant Undo

Other solutions

In Word 2010, how can you replace all occurrences of the same picture in a document with a different picture, using one or a few commands?

I'm working with Word 2010 and I am using the same picture in several different locations throughout my document.  I want to replace those pictures with another picture.  Is there an easy way to replace all the pictures at once or is it only possible...


Work with the XML file format (this obviously only works of the file is .docx / dotx / docm / dotm format...

Read more

Daniel Schwarz Carigiet at Quora Mark as irrelevant Undo

MS Word Question: How can I replace empty cells in an MS Word table with a string 'N/A' (quickly)?

I have a rather long table of text in MS Word (It's too hard to copy it into excel due to formatting of the text). One column specifies whether the entry is applicable or not. The person who filled it out left all of the N/As blank. How can I do find...


In the time it would take to do a custom macro you could do a zillion cut and paste operations. Put...

Read more

curious1... at Yahoo! Answers Mark as irrelevant Undo

Write a "C" Program to find and replace a particular word by another word in given string.?

For Example,the word "machine"should be replaced by the word "operation"in the sentence "Drilling machine Milling machine Grinding machine"


Use strstr to find the target string and then simple array operations to replace it with the new string...

Read more

OURGGVM4Y7RFFBHR5QOOHXRSU4 at Yahoo! Answers Mark as irrelevant Undo

My Documents aren't printing correctly in Word 2010?

I recently upgraded to Office 2010 yesterday, and cannot print documents correctly from Word, when my document comes out of the printer, it has 'scaled' my document down by about 70%, For example, if I open a fresh new word document, and make a square...


you will probably find it is the print settings that are set to do the standard legal size and not the...

Read more

Nathan at Yahoo! Answers Mark as irrelevant Undo

Microsoft word 2007 help!!!!!!!!!!!!?

Question 1 (Multiple Choice Worth 4 points) What steps would you take to hide the commands on the Ribbon so you have more room to work on your document? Double-click the active tab. Double-click any tab. Right-click the active tab. Right-click any tab...


For the first 12 questions, the answer is "E". The answer for the last one is "42"...

Read more

Rob at Yahoo! Answers Mark as irrelevant Undo

"Word Document" questions.?

Ill give out the points to whoever can help me with this. Please 1.You typed a paragraph on page 2 that should appear on page 7. To move that paragraph to the correct place in your document, you should use_______. a. Drag and drop c.Delete and replace...


1 B 2 D 3 C 4 Possibly D but not sure 5 not sure 6 not sure 7 not sure True/False 1 true 2 false (imo...

Read more

drmp at Yahoo! Answers Mark as irrelevant Undo

Java String Handling illusion?

hey Friends i am working on a project called find, replace TextField = Hello Saurav How Are You How Are You Doing Saurav Find What = Saurav Replace With = Gaurav all those 3 string must be get from user. or just tell me a string method tht replace a...


TextField tf = new TextField("Hello Saurav How Are You How Are You Doing Saurav"); parent...

Read more

Sourav S at Yahoo! Answers Mark as irrelevant Undo

C++ program to remove certain words from a string?

I have an origional text file...I need to remove certain words from the file..replace them with new words and save it as a new file...its a file with a bunch of lines and some of the words appear multiple times throughout the file..this is what I have...


For this: line[a]='###'; my compiler says:     warning: multi-character character constant...

Read more

MJ at Yahoo! Answers Mark as irrelevant Undo

How do I recover my lost word document?

I saved a word document, when putting it into dropbox I selected "copy and replace" because I already had a document with the same name in there. I then opened that document more


the replaced file can't be recovered. if you don't want to give, you can try some software like eassos...

Read more

JEKF4NF6TA5RZCPIOTHPZ6FZ4A at Yahoo! Answers Mark as irrelevant Undo

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.