officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-dot-appendtext-x28-system-dot-string-x29.md
Appends the specified text.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
DocumentRange AppendText(
string text
)
Function AppendText(
text As String
) As DocumentRange
| Name | Type | Description |
|---|---|---|
| text | String |
A string containing the text to append.
|
| Type | Description |
|---|---|
| DocumentRange |
A DocumentRange representing a range with the appended text.
|
document.AppendText("abcdefgh");
DocumentRange r1 = document.AppendText("X");
string s1 = String.Format("Range r1 starts at {0}, ends at {1}", r1.Start, r1.End);
document.AppendText("Y");
document.AppendText("Z");
string s2 = String.Format("Currently range r1 starts at {0}, ends at {1}", r1.Start, r1.End);
document.Paragraphs.Append();
document.AppendText(s1);
document.Paragraphs.Append();
document.AppendText(s2);
document.AppendText("abcdefgh")
Dim r1 As DocumentRange = document.AppendText("X")
Dim s1 As String = String.Format("Range r1 starts at {0}, ends at {1}", r1.Start, r1.End)
document.AppendText("Y")
document.AppendText("Z")
Dim s2 As String = String.Format("Currently range r1 starts at {0}, ends at {1}", r1.Start, r1.End)
document.Paragraphs.Append()
document.AppendText(s1)
document.Paragraphs.Append()
document.AppendText(s2)
The following code snippets (auto-collected from DevExpress Examples) contain references to the AppendText(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Formatting.cs#L14
document.BeginUpdate();
document.AppendText("Normal\nFormatted\nNormal");
document.EndUpdate();
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/CustomXmlActions.cs#L12
#region #AddCustomXmlPart
document.AppendText("This document contains custom XML parts.");
// Add an empty custom XML part.
word-document-api-examples/CS/CodeExamples/VbaMacrosActions.cs#L20
foreach (VbaModule module in document.VbaProject.Modules)
{ document.AppendText("\r\n \u00B7 " + module.Name); }
winforms-richedit-text-autocorrect-feature/CS/Expander/Form1.cs#L20
SetAutoCorrectOptions();
richEditControl1.Document.AppendText(@"This sample expander uses Mary Morken's 2007 list of abbreviations for medical transcriptions, containing 13420 entries.
The list has been downloaded from http://www.mtdaily.com/abbvs.txt. To indicate the beginning of the list, the line containing the 'START' string is added.");
winforms-richedit-customize-popup-menu/CS/RichEditContextMenu/Form1.cs#L21
richEditControl.Document.AppendText("Table Test\r\n");
Table table = richEditControl.Document.Tables.Create(richEditControl.Document.Paragraphs[1].Range.Start, 8, 8, AutoFitBehaviorType.AutoFitToWindow);
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Formatting.vb#L13
document.BeginUpdate()
document.AppendText("Normal" & Global.Microsoft.VisualBasic.Constants.vbLf & "Formatted" & Global.Microsoft.VisualBasic.Constants.vbLf & "Normal")
document.EndUpdate()
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/CustomXmlActions.vb#L9
' #Region "#AddCustomXmlPart"
document.AppendText("This document contains custom XML parts.")
' Add an empty custom XML part.
word-document-api-examples/VB/CodeExamples/HeaderAndFooterActions.vb#L23
Dim newHeader As DevExpress.XtraRichEdit.API.Native.SubDocument = firstSection.BeginUpdateHeader()
newHeader.AppendText("Header")
firstSection.EndUpdateHeader(newHeader)
winforms-richedit-text-autocorrect-feature/VB/Expander/Form1.vb#L19
SetAutoCorrectOptions()
richEditControl1.Document.AppendText("This sample expander uses Mary Morken's 2007 list of abbreviations for medical transcriptions, containing 13420 entries. " & ControlChars.CrLf & _
"The list has been downloaded from http://www.mtdaily.com/abbvs.txt. To indicate the beginning of the list, the line containing the 'START' string is added.")
winforms-richedit-customize-popup-menu/VB/RichEditContextMenu/Form1.vb#L20
richEditControl.Document.AppendText("Table Test" & ControlChars.CrLf)
Dim table As Table = richEditControl.Document.Tables.Create(richEditControl.Document.Paragraphs(1).Range.Start, 8, 8, AutoFitBehaviorType.AutoFitToWindow)
See Also