Skype:TextControlSupport
Orders:877-462-4772
TX Text Control - word processing components.
« »

Copying the complete content into the clipboard

Blogged by Björn Meyer on April 04, 2006 and tagged with Samples, .NET.

Sometimes, it is necessary to copy the complete content of TX Text Control .NET into the clipboard. If you do this by selecting everything and using the Copy() method, not every element will be copied into the clipboard. In this case, the Save() method can be used to save the content into a variable. Using this variable, a DataObject can be filled and passed to the Clipboard itself.

Dim data As New DataObject
Dim RTF As String

TextControl1.Save(RTF, TXTextControl.StringStreamType.RichTextFormat)
data.SetData(DataFormats.Rtf, RTF)
Clipboard.SetDataObject(data)
« Prev:Changing FieldTypeData of a specific field
» Next:Does TX Text Control fit my requirements?

Comments

If you would like to comment on this blog entry, please post a comment.

Posted by Thomas Sauder on Thursday, February 19, 2009 at 13:57:50:

This seems not to work when the last "object" of the content is an image. As soon as I add a character after the image it works.

Any idea on how to copy the complete content with an image at the end?
External verification page for ISO 9000:2000 certificate
ISO 9001:2000
certified