We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Read and replace entire text contents of Word Document

Thread ID:





131805 Jul 27,2017 06:51 PM UTC Jul 28,2017 12:46 PM UTC ASP.NET MVC 1
Tags: DocIO
Philip Tenn
Asked On July 27, 2017 06:51 PM UTC

Hi All,

I am looking to translate an English Word Document to Spanish.

Basically, I need to read the entire text contents, translate, and replace entire text contents.

I know I can read the text with WordDocument.GetText.

How can I write it back?  Also, is there a way to preserve formatting?



Devisri Jothi [Syncfusion]
Replied On July 28, 2017 12:46 PM UTC

Hi Philip, 
Thank you for contacting Syncfusion support. 
Yes, we can get the text using WordDocument.GetText(), however, the formatting of the content will be eventually lost on replacing the text. We have created a sample to meet your requirement. The sample demonstrates how to retrieve multiple text range in a paragraph and replace with the desired text. You may download the sample from the below link, 
The generated document will be located in the output folder of the provided sample. 
Please let us know if you need any further assistance. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon