Append and Insert Documents

Windows Forms User's Guide > Howto: Edit and Format Text From Code

How to append a document

To append an existing document, the TextControl.Append method should be used.

The first thing required in order to insert a file into your document is to specify the location where it is to be inserted. This is done using the Selection.Start property. Having set the input position to the desired location, the Selection.Load method can be used to insert a file, string or image. In this sample, first an RTF file is loaded, and then a HTML file is appended to its end.

textControl1.Load ("..\\..\\TestFiles\\Caption.rtf",
textControl1.Selection.Start = textControl1.Text.Length; 
textControl1.Selection.Load ("..\\..\\TestFiles\\Net.htm",
[Visual Basic]
TextControl1.Load("..\TestFiles\Caption.rtf", _
TextControl1.Selection.Start = TextControl1.Text.Length
TextControl1.Selection.Load("..\TestFiles\Net.htm", _