Version

AppendText Method

Appends the specified text at the end of the document.
Syntax
'Declaration
 
Public Sub AppendText( _
   ByVal text As String, _
   ByRef error As String, _
   Optional ByVal createNewParagraph As Boolean, _
   Optional ByVal characterSettings As CharacterSettings, _
   Optional ByVal runStyleId As String, _
   Optional ByVal mergeWithExistingSettings As Boolean _
) 
public void AppendText( 
   string text,
   out string error,
   bool createNewParagraph,
   CharacterSettings characterSettings,
   string runStyleId,
   bool mergeWithExistingSettings
)

Parameters

text
Text to append.
error
If an error occurs, this will be set to an error message.
createNewParagraph
If true then a new paragraph is created.
characterSettings
Optional parameter. Character settings to apply to the text. If null and mergeWithExistingSettings is true then the inserted text will pick up the settings of the paragraph content before the specified offset. If non-null and mergeWithExistingSettings is true then settings from this settings object will be merged with the settings from the previous content and the merged settings will be applied to the inserted text. If mergeWithExistingSettings is false then these settings will be applied as they are without merging, even in the case where characterSettings is null in which case any explicit settings from the previous content will not be applied to the new content.
runStyleId
Optional parameter. Run style to apply to the text. If null and mergeWithExistingSettings is true then the inserted text will pick up the style of the paragraph content before the specified offset.
mergeWithExistingSettings
Indicates whether to use any explicit character settings and run style from the paragraph content before the specified offset.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also