Document Methods

The Document type exposes the following members.

Methods
  NameDescription
Public methodCode exampleAccept
Accepts a visitor.
(Overrides NodeAccept(DocumentVisitor).)
Public methodCode exampleAcceptAllRevisions
Accepts all tracked changes in the document.
Protected methodAcceptChildren (Inherited from CompositeNode.)
Protected methodAcceptCore (Inherited from CompositeNode.)
Public methodCode exampleAppendChild
Adds the specified node to the end of the list of child nodes for this node.
(Inherited from CompositeNode.)
Public methodCode exampleAppendDocument(Document, ImportFormatMode)
Appends the specified document to the end of this document.
Public methodCode exampleAppendDocument(Document, ImportFormatMode, ImportFormatOptions)
Appends the specified document to the end of this document.
Public methodCode exampleCleanup
Cleans unused styles and lists from the document.
Public methodCode exampleCleanup(CleanupOptions)
Cleans unused styles and lists from the document depending on given CleanupOptions.
Public methodCode exampleClone
Performs a deep copy of the Document.
Public methodCode exampleClone(Boolean) (Inherited from Node.)
Public methodCode exampleCompare(Document, String, DateTime)
Compares this document with another document producing changes as number of edit and format revisions Revision.
Public methodCode exampleCompare(Document, String, DateTime, CompareOptions)
Compares this document with another document producing changes as a number of edit and format revisions Revision. Allows to specify comparison options using CompareOptions.
Public methodCode exampleCopyStylesFromTemplate(String)
Copies styles from the specified template to a document.
Public methodCode exampleCopyStylesFromTemplate(Document)
Copies styles from the specified template to a document.
Protected methodCoreRemoveSelfOnly (Inherited from CompositeNode.)
Public methodCode exampleCreateNavigator
Reserved for system use. IXPathNavigable.
(Inherited from CompositeNode.)
Public methodCode exampleEnsureMinimum
If the document contains no sections, creates one section with one paragraph.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodCode exampleExpandTableStylesToDirectFormatting
Converts formatting specified in table styles into direct formatting on tables in the document.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAncestor(Type)
Gets the first ancestor of the specified object type.
(Inherited from Node.)
Public methodCode exampleGetAncestor(NodeType)
Gets the first ancestor of the specified NodeType.
(Inherited from Node.)
Public methodCode exampleGetChild
Returns an Nth child node that matches the specified type.
(Inherited from CompositeNode.)
Public methodCode exampleGetChildNodes
Returns a live collection of child nodes that match the specified type.
(Inherited from CompositeNode.)
Public methodCode exampleGetEnumerator
Provides support for the for each style iteration over the child nodes of this node.
(Inherited from CompositeNode.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodCode exampleGetPageInfo
Gets the page size, orientation and other information about a page that might be useful for printing or rendering.
Public methodCode exampleGetText
Gets the text of this node and of all its children.
(Inherited from CompositeNode.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodCode exampleImportNode(Node, Boolean)

Imports a node from another document to the current document.

(Inherited from DocumentBase.)
Public methodCode exampleImportNode(Node, Boolean, ImportFormatMode)

Imports a node from another document to the current document with an option to control formatting.

(Inherited from DocumentBase.)
Public methodCode exampleIndexOf
Returns the index of the specified child node in the child node array.
(Inherited from CompositeNode.)
Public methodCode exampleInsertAfter
Inserts the specified node immediately after the specified reference node.
(Inherited from CompositeNode.)
Public methodCode exampleInsertBefore
Inserts the specified node immediately before the specified reference node.
(Inherited from CompositeNode.)
Public methodCode exampleJoinRunsWithSameFormatting
Joins runs with same formatting in all paragraphs of the document.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodCode exampleNextPreOrder
Gets next node according to the pre-order tree traversal algorithm.
(Inherited from Node.)
Public methodCode exampleNormalizeFieldTypes
Changes field type values FieldType of FieldStart, FieldSeparator, FieldEnd in the whole document so that they correspond to the field types contained in the field codes.
Public methodCode examplePrependChild
Adds the specified node to the beginning of the list of child nodes for this node.
(Inherited from CompositeNode.)
Public methodPreviousPreOrder
Gets the previous node according to the pre-order tree traversal algorithm.
(Inherited from Node.)
Public methodCode examplePrint
Prints the whole document to the default printer.
Public methodCode examplePrint(PrinterSettings)
Prints the document according to the specified printer settings, using the standard (no User Interface) print controller.
Public methodCode examplePrint(String)
Print the whole document to the specified printer, using the standard (no User Interface) print controller.
Public methodCode examplePrint(PrinterSettings, String)
Prints the document according to the specified printer settings, using the standard (no User Interface) print controller and a document name.
Public methodCode exampleProtect(ProtectionType)
Protects the document from changes without changing the existing password or assigns a random password.
Public methodCode exampleProtect(ProtectionType, String)
Protects the document from changes and optionally sets a protection password.
Public methodCode exampleRemove
Removes itself from the parent.
(Inherited from Node.)
Public methodCode exampleRemoveAllChildren
Removes all the child nodes of the current node.
(Inherited from CompositeNode.)
Public methodCode exampleRemoveChild
Removes the specified child node.
(Inherited from CompositeNode.)
Public methodCode exampleRemoveExternalSchemaReferences
Removes external XML schema references from this document.
Public methodCode exampleRemoveMacros
Removes all macros (the VBA project) as well as toolbars and command customizations from the document.
Public methodCode exampleRemoveSmartTags
Removes all SmartTag descendant nodes of the current node.
(Inherited from CompositeNode.)
Public methodCode exampleRenderToScale
Renders a document page into a Graphics object to a specified scale.
Public methodCode exampleRenderToSize
Public methodCode exampleSave(String)
Saves the document to a file. Automatically determines the save format from the extension.
Public methodCode exampleSave(Stream, SaveFormat)
Saves the document to a stream using the specified format.
Public methodCode exampleSave(Stream, SaveOptions)
Saves the document to a stream using the specified save options.
Public methodCode exampleSave(String, SaveFormat)
Saves the document to a file in the specified format.
Public methodCode exampleSave(String, SaveOptions)
Saves the document to a file using the specified save options.
Public methodCode exampleSave(HttpResponse, String, ContentDisposition, SaveOptions)
Sends the document to the client browser.
Public methodCode exampleSelectNodes
Selects a list of nodes matching the XPath expression.
(Inherited from CompositeNode.)
Public methodCode exampleSelectSingleNode
Selects the first Node that matches the XPath expression.
(Inherited from CompositeNode.)
Public methodCode exampleStartTrackRevisions(String)
Starts automatically marking all further changes you make to the document programmatically as revision changes.
Public methodCode exampleStartTrackRevisions(String, DateTime)
Starts automatically marking all further changes you make to the document programmatically as revision changes.
Public methodCode exampleStopTrackRevisions
Stops automatic marking of document changes as revisions.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodCode exampleToString(SaveFormat)
Exports the content of the node into a string in the specified format.
(Inherited from Node.)
Public methodCode exampleToString(SaveOptions)
Exports the content of the node into a string using the specified save options.
(Inherited from Node.)
Public methodCode exampleUnlinkFields
Unlinks fields in the whole document.
Public methodCode exampleUnprotect
Removes protection from the document regardless of the password.
Public methodCode exampleUnprotect(String)
Removes protection from the document if a correct password is specified.
Public methodCode exampleUpdateFields
Updates the values of fields in the whole document.
Public methodCode exampleUpdateListLabels
Updates list labels for all list items in the document.
Public methodCode exampleUpdatePageLayout
Rebuilds the page layout of the document.
Public methodCode exampleUpdateTableLayout
Updates widths of cells and tables in the document according to their preferred widths and content. You do not need to call this method if the tables appear correct in the output document.
Public methodCode exampleUpdateThumbnail
Updates Thumbnail of the document using default options.
Public methodCode exampleUpdateThumbnail(ThumbnailGeneratingOptions)
Updates Thumbnail of the document according to the specified options.
Public methodCode exampleUpdateWordCount
Updates word count properties of the document.
Public methodCode exampleUpdateWordCount(Boolean)
Updates word count properties of the document, optionally updates Lines property.
Protected methodWriteDocToHttResponse
See Also