BookmarkAddText Method | |
Bookmark add text into paragraph element with style (optional).
Supported checkbox symbol #CheckboxOn# and #CheckboxOff#
Namespace:
SIC.OpenDocumentFormat.MSWord
Assembly:
SIC.OpenDocumentFormat (in SIC.OpenDocumentFormat.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax public void AddText(
string pBookmarkName,
string pText,
string pStyle = "",
bool pNewParagraph = false
)
Public Sub AddText (
pBookmarkName As String,
pText As String,
Optional pStyle As String = "",
Optional pNewParagraph As Boolean = false
)
Parameters
- pBookmarkName
- Type: SystemString
bookmark name - pText
- Type: SystemString
text append - pStyle (Optional)
- Type: SystemString
style name must exist - pNewParagraph (Optional)
- Type: SystemBoolean
Insert a new paragraph after bookmark
Examples
The basic document structure of a WordprocessingML document consists of the document and body elements,
followed by one or more block level elements such as p, which represents a paragraph.
A paragraph contains one or more r elements.
The r stands for run, which is a region of text with a common set of properties, such as formatting.
A run contains one or more t elements. The t element contains a range of text.
The following code example shows the WordprocessingML markup for a document that contains the text "Example text."
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:body>
<w:p>
<w:r>
<w:t>Example text.</w:t>
</w:r>
</w:p>
</w:body>
</w:document>
Style into Paragraph Properties
<w:p xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:pPr>
<w:pStyle w:val="StyleName" />
</w:pPr>
...
</w:p>
See link https://msdn.microsoft.com/en-us/library/office/cc850838.aspx
See Also