Document Methods
An interface that exposes the specific functionality of the document.| Name | Description |
|---|---|
| AppendDocumentContent(DocumentRange, InsertOptions) | Appends content from the specified range. Inherited from SubDocument. |
| AppendDocumentContent(DocumentRange) | Appends content from the specified range. Inherited from SubDocument. |
| AppendDocumentContent(Stream, DocumentFormat, String, InsertOptions) | Appends content from the stream. Inherited from SubDocument. |
| AppendDocumentContent(Stream, DocumentFormat, String) | Appends content from the stream. Inherited from SubDocument. |
| AppendDocumentContent(Stream, DocumentFormat) | Appends content from the stream. Inherited from SubDocument. |
| AppendDocumentContent(Stream) | Appends content from stream. Inherited from SubDocument. |
| AppendDocumentContent(String, DocumentFormat, String, InsertOptions) | Appends content from the file. Inherited from SubDocument. |
| AppendDocumentContent(String, DocumentFormat, String) | Appends content from the file. Inherited from SubDocument. |
| AppendDocumentContent(String, DocumentFormat) | Appends content from the file. Inherited from SubDocument. |
| AppendDocumentContent(String) | Appends content from the file. Inherited from SubDocument. |
| AppendHtmlText(String, InsertOptions) | Appends HTML formatted text. Inherited from SubDocument. |
| AppendHtmlText(String) | Appends HTML formatted text. Inherited from SubDocument. |
| AppendRtfText(String, InsertOptions) | Appends formatted text. Inherited from SubDocument. |
| AppendRtfText(String) | Appends formatted text. Inherited from SubDocument. |
| AppendSection() | Appends a new empty section and returns the section to which this section is appended. |
| AppendSingleLineText(String) | Appends text as a single line. Inherited from SubDocument. |
| AppendText(String) | Appends the specified text. Inherited from SubDocument. |
| ApplySyntaxHighlight(List<SyntaxHighlightToken>) | Performs a batch update of text formatting for document ranges corresponding to specified tokens. Inherited from SubDocument. |
| BeginUpdate() |
Locks the SubDocument object. Prevents visual updates until the EndUpdate method calls.
Inherited from SubDocument. |
| BeginUpdateCharacters(DocumentPosition, Int32) | Starts modifying properties of the specified number of characters starting at the specified document position. Inherited from SubDocument. |
| BeginUpdateCharacters(DocumentRange) | Starts modifying properties of characters that fall within a specified document range. Inherited from SubDocument. |
| BeginUpdateCharacters(Int32, Int32) | Starts modifying properties of the specified number of characters starting at the specified document position. Inherited from SubDocument. |
| BeginUpdateParagraphs(DocumentRange) | Starts modifying properties of the paragraphs that fall within a specified document range. Inherited from SubDocument. |
| BeginUpdateRangePermissions() | Gets the collection of all range permissions in the current document. Inherited from SubDocument. |
| CancelUpdateRangePermissions(RangePermissionCollection) | Finalizes the update process, leaving range permissions intact. Inherited from SubDocument. |
| ChangeActiveDocument(SubDocument) | Enables you to operate on selections in documents other than the main document, such as headers and footers. |
| Copy() | Copies the currently selected text to the Clipboard. |
| Copy(DocumentRange) | Copies the specified range of text to the Clipboard. |
| CreateMailMergeOptions() | Enables customizing the mail merge options. |
| CreatePosition(Int32) | Creates a new position in the current document. Inherited from SubDocument. |
| CreateRange(DocumentPosition, Int32) | Creates a new document range using the specified start position and range length. Inherited from SubDocument. |
| CreateRange(Int32, Int32) | Creates a new document range using the specified start position and range length. Inherited from SubDocument. |
| Cut() | Removes the currently selected text and copies it to the Clipboard. |
| Cut(DocumentRange) | Removes the specified range of text and copies it to the Clipboard. |
| Delete(DocumentRange) | Removes content from the specified range. Inherited from SubDocument. |
| EndUpdate() |
Unlocks the SubDocument object after you call BeginUpdate. It also causes an immediate visual update.
Inherited from SubDocument. |
| EndUpdateCharacters(CharacterProperties) | Finalizes the modification of character formatting after calling the SubDocument.BeginUpdateCharacters method. Inherited from SubDocument. |
| EndUpdateParagraphs(ParagraphProperties) | Finalizes the modification of paragraph formatting after the BeginUpdateParagraphs method call. Inherited from SubDocument. |
| EndUpdateRangePermissions(RangePermissionCollection) | Finalizes the update and applies the changes to range permissions. Inherited from SubDocument. |
| FindAll(String, SearchOptions, DocumentRange) | Finds all text ranges that match the specified string in the specified document range. Inherited from SubDocument. |
| FindAll(String, SearchOptions) | Finds all text ranges that match the specified string in the specific part of the document (main body, text box, header, footer, comment, footnote, and endnote). Inherited from SubDocument. |
| FindAll(Regex, DocumentRange) | Finds all occurrences of a character pattern specified by the regular expression. Inherited from SubDocument. |
| FindAll(Regex) | Finds all occurrences of a character pattern specified by the regular expression. Inherited from SubDocument. |
| GetAuthors() | Returns the list of the document’s authors. |
| GetDocBytes(DocumentRange, DocDocumentExporterOptions) | Exports the range content in DOC (Microsoft Word 97-2003 Document) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDocBytes(DocumentRange) | Exports the range content in DOC (Microsoft Word 97-2003 Document) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDocmBytes(DocumentRange, DocmDocumentExporterOptions) | Exports the range content in DOCM (Microsoft Office Open XML Macro-Enabled Document) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDocmBytes(DocumentRange) | Exports the range content in DOCM (Microsoft Office Open XML Macro-Enabled Document) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDocxBytes(DocumentRange, OpenXmlDocumentExporterOptions) | Exports the content of the specified document range as a document in Office Open XML (DOCX) format and returns a byte array with this document. Inherited from SubDocument. |
| GetDocxBytes(DocumentRange) | Exports the content of the specified document range as a document in Office Open XML (DOCX) format and returns a byte array with this document. Inherited from SubDocument. |
| GetDotBytes(DocumentRange, DotDocumentExporterOptions) | Exports the range content in DOT (Microsoft Word 97-2007 Template) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDotBytes(DocumentRange) | Exports the range content in DOT (Microsoft Word 97-2007 Template) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDotmBytes(DocumentRange, DotmDocumentExporterOptions) | Exports the range content in DOTM (Microsoft Office Open XML Macro-Enabled Template) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDotmBytes(DocumentRange) | Exports the range content in DOTM (Microsoft Office Open XML Macro-Enabled Template) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDotxBytes(DocumentRange, DotxDocumentExporterOptions) | Exports the range content in DOTX (Microsoft Office Open XML macro-free template) format and returns a byte array with this content. Inherited from SubDocument. |
| GetDotxBytes(DocumentRange) | Exports the range content in DOTX (Microsoft Office Open XML macro-free template) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcBytes(DocumentRange, FlatOpcDocumentExporterOptions) | Exports the range content in FlatOpc (Microsoft Word XML Document, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcBytes(DocumentRange) | Exports the range content in FlatOpc (Microsoft Word XML Document, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcMacroEnabledBytes(DocumentRange, FlatOpcMacroEnabledDocumentExporterOptions) | Exports the range content in FlatOpcMacroEnabled (Microsoft Word XML Macro-Enabled Document, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcMacroEnabledBytes(DocumentRange) | Exports the range content in FlatOpcMacroEnabled (Microsoft Word XML Macro-Enabled Document, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcMacroEnabledTemplateBytes(DocumentRange, FlatOpcMacroEnabledTemplateDocumentExporterOptions) | Exports the range content in FlatOpcMacroEnabledTemplate (Microsoft Word XML Macro-Enabled Template, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcMacroEnabledTemplateBytes(DocumentRange) | Exports the range content in FlatOpcMacroEnabledTemplate (Microsoft Word XML Macro-Enabled Template, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcTemplateBytes(DocumentRange, FlatOpcTemplateDocumentExporterOptions) | Exports the range content in FlatOpcTemplate (Microsoft Word XML Template, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetFlatOpcTemplateBytes(DocumentRange) | Exports the range content in FlatOpcTemplate (Microsoft Word XML Template, .xml) format and returns a byte array with this content. Inherited from SubDocument. |
| GetHtmlText(DocumentRange, IUriProvider, HtmlDocumentExporterOptions) | Gets the text contained in the specified range in HTML format. Inherited from SubDocument. |
| GetHtmlText(DocumentRange, IUriProvider) | Gets the text contained in the specified range in HTML format. Inherited from SubDocument. |
| GetMhtText(DocumentRange, MhtDocumentExporterOptions) | Gets the content of the specified document range in MHT format. Inherited from SubDocument. |
| GetMhtText(DocumentRange) | Gets the content of the specified document range in MHT format. Inherited from SubDocument. |
| GetOdtBytes(DocumentRange, OpenDocumentExporterOptions) | Exports the content of the specified document range as a document in Open Document (ODT) format and returns a byte array with this document. Inherited from SubDocument. |
| GetOdtBytes(DocumentRange) | Exports the content of the specified document range as a document in Open Document (ODT) format and returns a byte array with this document. Inherited from SubDocument. |
| GetOpenDocumentBytes(DocumentRange, OpenDocumentExporterOptions) | Exports the content of the specified document range as a document in Open Document (ODT) format and returns a byte array with this document. Inherited from SubDocument. |
| GetOpenDocumentBytes(DocumentRange) | Exports the content of the specified document range as a document in Open Document (ODT) format and returns a byte array with this document. Inherited from SubDocument. |
| GetOpenXmlBytes(DocumentRange, OpenXmlDocumentExporterOptions) | Exports the content of the specified document range as a document in Office Open XML (Docx) format and returns a byte array with this document. Inherited from SubDocument. |
| GetOpenXmlBytes(DocumentRange) | Exports the content of the specified document range as a document in Office Open XML (Docx) format and returns a byte array with this document. Inherited from SubDocument. |
| GetRtfText(DocumentRange, RtfDocumentExporterOptions) | Gets the formatted string of the text contained in the specified range. Inherited from SubDocument. |
| GetRtfText(DocumentRange) | Gets the formatted string of the text contained in the specified range. Inherited from SubDocument. |
| GetSection(DocumentPosition) | Gets the section encompassing the specified position. |
| GetSubDocumentType() | Returns the subdocument type. Inherited from SubDocument. |
| GetText(DocumentRange, TextFragmentOptions) | Returns the plain text of the specified document range. Inherited from SubDocument. |
| GetText(DocumentRange, PlainTextDocumentExporterOptions, TextFragmentOptions) | Returns the plain text of the specified document range. Inherited from SubDocument. |
| GetText(DocumentRange, PlainTextDocumentExporterOptions) | Returns the plain text of the specified document range. Inherited from SubDocument. |
| GetText(DocumentRange) | Returns the plain text of the specified document range. Inherited from SubDocument. |
| GetWordMLText(DocumentRange, WordMLDocumentExporterOptions) | Gets the text contained in the specified range in WordML format. Inherited from SubDocument. |
| GetWordMLText(DocumentRange) | Gets the text contained in the specified range in WordML format. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, DocumentRange, InsertOptions) | Inserts content from the specified range in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, DocumentRange) | Inserts content from the specified range in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, Stream, DocumentFormat, InsertOptions) | Inserts content from the specified stream in the specified format, at the specified position, in the current document. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, Stream, DocumentFormat, String, InsertOptions) | Inserts content from the specified stream in the specified format, at the specified position, in the current document. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, Stream, DocumentFormat, String) | Insert content from the stream in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, Stream, DocumentFormat) | Inserts content from the stream in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, Stream) | Inserts content from the stream in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, String, DocumentFormat, InsertOptions) | Inserts content from the file in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, String, DocumentFormat, String, InsertOptions) | Inserts content from the file in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, String, DocumentFormat, String) | Inserts content from the file in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, String, DocumentFormat) | Inserts content from the file in the current document at the specified position. Inherited from SubDocument. |
| InsertDocumentContent(DocumentPosition, String) | Inserts content from the file in the current document at the specified position. Inherited from SubDocument. |
| InsertHtmlText(DocumentPosition, String, InsertOptions) | Inserts the specified HTML text into the specified position. Inherited from SubDocument. |
| InsertHtmlText(DocumentPosition, String) | Inserts the specified HTML text into the specified position. Inherited from SubDocument. |
| InsertRtfText(DocumentPosition, String, InsertOptions) | Inserts the specified formatted text into the specified position. Inherited from SubDocument. |
| InsertRtfText(DocumentPosition, String) | Inserts the specified formatted text into the specified position. Inherited from SubDocument. |
| InsertSection(DocumentPosition) | Inserts a new section into the document’s Document.Sections collection at a specified position. |
| InsertSingleLineText(DocumentPosition, String) | Inserts a single line of text (text without line breaks) at the specified position. Inherited from SubDocument. |
| InsertText(DocumentPosition, String) | Inserts the specified text at the specified position. Inherited from SubDocument. |
| LoadDocument(Byte[], DocumentFormat, String) | Loads a document in the specified format from a byte array. You can use this method to load HTML documents with connected files. |
| LoadDocument(Byte[], DocumentFormat) | Loads a document in the specified format from a byte array. |
| LoadDocument(Byte[]) | Loads a document from a byte array. The file format is determined based on document content. |
| LoadDocument(Stream, DocumentFormat, String) | Loads a document from the stream in the specified format. External content for HTML format is retrieved using the specified source (base) URI. |
| LoadDocument(Stream, DocumentFormat) | Loads a document from a stream, specifying the document format. |
| LoadDocument(Stream) | Loads a document from the stream. |
| LoadDocument(String, DocumentFormat, String) | Loads a document from the file in the specified format. External content for HTML format is retrieved using the specified source (base) URI. |
| LoadDocument(String, DocumentFormat) | Loads a document from a file, specifying the document format. |
| LoadDocument(String) | Loads a document from the specified file. The file format is determined by its content. |
| MailMerge(Document) | Merges data to the current document and sends the result to the specified Document instance. |
| MailMerge(MailMergeOptions, Document) | Merges data to the current document and sends the result to the specified Document instance. Allows you to set the mail merge options. |
| MailMerge(MailMergeOptions, Stream, DocumentFormat) | Merges data to the current document and sends the result in the specified format to a stream. Allows you to set mail merge options. |
| MailMerge(MailMergeOptions, String, DocumentFormat) | Merges data to the current document and saves the result to a file in the specified format. Allows you to set mail merge options. |
| MailMerge(Stream, DocumentFormat) | Merges data to the current document, and sends the result in the specified format to a stream. |
| MailMerge(String, DocumentFormat) | Merges data to the current document and sends the result to a file in the specified format. |
| MakeAllTablesWordCompatible() | Merges all columns with indexes greater than 63 into a single column for all tables in a document. |
| Paste() | Insert a text from the Clipboard into the current CaretPosition. |
| Paste(DocumentFormat) | Inserts the contents of the Clipboard in the specified format at the caret position. |
| Protect(String, DocumentProtectionType) | Enforces document protection and sets the specified password. |
| Protect(String) | Protects a document with a given password. |
| Replace(DocumentRange, String) | Replaces the specified document range with the specified text string. Inherited from SubDocument. |
| ReplaceAll(String, String, SearchOptions, DocumentRange) | Finds all occurrences of the search string in the specified range, and replaces them with the replacement string. Inherited from SubDocument. |
| ReplaceAll(String, String, SearchOptions) | Finds all occurrences of the search string in the current document, and replaces them with the replacement string. Inherited from SubDocument. |
| ReplaceAll(Regex, String, DocumentRange) | Replaces all occurrences of a character pattern defined by a regular expression with a specified replacement string. Inherited from SubDocument. |
| ReplaceAll(Regex, String) | Replaces all occurrences of a character pattern defined by a regular expression with a specified replacement string. Inherited from SubDocument. |
| SaveDocument(DocumentFormat, EncryptionSettings) | Saves the document to a byte array in the specified file format and encrypts it with a password. |
| SaveDocument(DocumentFormat) | Saves the document to a byte array in the specified file format. |
| SaveDocument(Stream, DocumentFormat, EncryptionSettings) | Saves the document to a stream, specifying the document’s format and encryption options. |
| SaveDocument(Stream, DocumentFormat) | Saves the document to a stream, specifying the document’s format. |
| SaveDocument(String, DocumentFormat, EncryptionSettings) | Saves the document to a stream, specifying the document’s format and encryption options. |
| SaveDocument(String, DocumentFormat) | Saves the document to a file, specifying the document’s format. |
| SelectAll() | Selects all the content in the document. Inherited from SubDocument. |
| SetPageBackground(Boolean) | Shows the background color of the page. Inherited from SubDocument. |
| SetPageBackground(Color, Boolean) | Sets the background color of the page and specifies whether it is shown. Inherited from SubDocument. |
| SetPageBackground(Color) | Set the background color of the page. Inherited from SubDocument. |
| StartSearch(String, SearchOptions, SearchDirection, DocumentRange) | Provides a search interface for a search in the specified range in the specified direction, using the specified options. Inherited from SubDocument. |
| StartSearch(String, SearchOptions, SearchDirection) | Provides a search interface for a search in the current document in the specified direction, using the specified options. Inherited from SubDocument. |
| StartSearch(String) | Provides a search interface with default parameters. Inherited from SubDocument. |
| StartSearch(Regex, DocumentRange) | Provides a search interface for a search in the specified range using a regular expression pattern. Inherited from SubDocument. |
| StartSearch(Regex) | Provides a search interface for a search in the document, using a regular expression pattern. Inherited from SubDocument. |
| UnlinkAllFields() | Replaces all document fields with field values. |
| Unprotect() | Removes document protection. |
| UpdateAllFields() | Updates all fields in the document. |
See Also