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

Inserting preformatted text into a word document

Thread ID:





78094 Nov 27,2008 04:26 PM UTC Dec 6,2017 12:36 PM UTC WinForms 5
Tags: DocIO
Johannes Goetz
Asked On November 27, 2008 04:26 PM UTC

Hi everybody !!

Initial situation: I got a string, which contains a RTF text like this:

{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard
This is some {\b bold} text.\par

Now I want to insert this text into a word document and keep the with rtf defined format.

Another way could be copying the rtf-formatted text into the clipboard. But how do I insert text from the clipboard into a document?


.Net 2.0 | Essential Studio

Bhuvaneswari P [Syncfusion]
Replied On December 3, 2008 09:22 AM UTC

Hi Johannes,

Thank you for your interest in Syncfusion product.

Currently we don't have support to insert the RTF text into the word document using DocIO. We have planned to implement this feature in our next release.

We don't have any API's to insert the Copy clipboard to word document. But we can work around this by converting the Clipboard object to image and then insert the image into the table cell. Please find the below code snippet to do so:

WordDocument doc = new WordDocument();
Bitmap image = null;
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Bitmap))
image = (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap);

Please let me know if you need any further assistance.

Best Regards,

Van Meerbeeck Jonathan
Replied On June 24, 2015 04:30 AM UTC


I want to copy RTF text as well into a word document. Is this feature already available?

Thank you

Kind regards

Sathish K [Syncfusion]
Replied On June 25, 2015 09:40 AM UTC

Hi Jonathan,

Thank you for contacting Syncfusion support.

We have created a separate incident under your account for the better follow up on your query. Kindly follow that incident to get solution for your query. Please let us know if you need any further assistance. We will be happy to assist you as always.


Replied On December 5, 2017 09:29 AM UTC

Do you support, appending RTF content to Word document ? 

Ramanan  Hariharasubramanian [Syncfusion]
Replied On December 6, 2017 12:36 PM UTC

Hi Marimuthu,

At present, DocIO does not have direct API to append the RTF content into an existing Word document.

You can use the below solution to append RTF content to an existing Word document.

1. Open the RTF content as new WordDocument instance.
2. Import this WordDocument instance, to the destination Word document using ImportContent() method.

We have prepared sample for the same. Please find the sample from below location.

Sample link:

To know more about ImportContent method kindly refer the below UG documentation link.

Kindly let us know if the sample fulfills your requirement.

Ramanan H


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

or the page will be automatically redirected to 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