Skip to end of metadata
Go to start of metadata

Description

Creates and returns a CharacterRun at the beginning of this Element. The text to be inserted is specified as well as the font that should override the font found in the style of the character run's enclosing paragraph.

C#
 public virtual CharacterRun InsertTextBefore(System.String text, Font props)
vb.net
Public Overridable Function InsertTextBefore(ByVal text As String, ByVal props As Font) As CharacterRun

Parameters

text
A String representing the text to insert.
props
A Font object representing the font that should override the font found in the style of the character run's enclosing paragraph.

Returns

The CharacterRun containing the inserted text.

Examples

C#
CharacterRun charRun = e.InsertTextBefore("Here is some text.", fnt);
vb.net
Dim charRun As CharacterRun = e.InsertTextBefore("Here is some text.", fnt)
  • No labels