Click or drag to resize

IDocument Interface

Represents the MS Word Document.

Namespace: Spire.Doc.Interface
Assembly: Spire.Doc (in Spire.Doc.dll) Version: 13.2.3.0 (13.2.3.3046)
Syntax
public interface IDocument : ICompositeObject, 
	IDocumentObject

The IDocument type exposes the following members.

Properties
Name Description
Public property Background
Gets background for the document.
Public property Bookmarks
Gets collection of bookmarks of the document
Public property BuiltinDocumentProperties
Gets document's built-in properties.
Public property ChildObjects
Gets the child entities.
(Inherited from ICompositeObject .)
Public property Comments
Gets Collection of Comments of the document.
Public property CustomDocumentProperties
Gets document's custom properties.
Public property Document
Gets document of this entity.
(Inherited from IDocumentObject .)
Public property DocumentObjectType
Gets the type of the document object.
(Inherited from IDocumentObject .)
Public property HasChanges
Gets a value indicating whether the document has tracked changes.
Public property IsComposite
Gets a value indicating whether this instance is composite.
(Inherited from IDocumentObject .)
Public property IsUpdateFields
Gets or sets a value indicating whether to update fields in the document. On the moment only DOCVARIABLE fields can be updated.
Public property LastParagraph
Gets the last paragraph.
Public property LastSection
Gets last section object.
Public property ListStyles
Gets collection of list styles.
Public property MailMerge
Gets mail merge engine.
Public property NextSibling
Gets the next sibling.
(Inherited from IDocumentObject .)
Public property Owner
Gets owner of this document object.
(Inherited from IDocumentObject .)
Public property PreviousSibling
Gets the previous sibling.
(Inherited from IDocumentObject .)
Public property Properties
Gets the document properties.
Public property ProtectionType
Gets or sets the type of protection of the document.
Public property Sections
Gets collection of sections of this document.
Public property Styles
Gets collection of styles.
Public property TextBoxes
Gets the textboxes of the document.
Public property TOC
Gets or sets the TOC element of the document.
Public property Variables
Gets or sets the document variables.
Public property ViewSetup
Returns or setsview type in MSWord.
Public property Watermark
Gets or sets watermark for the document.
Top
Methods
Name Description
Public method AddListStyle
Adds new list style to document.
Public method AddParagraphStyle
Adds new paragraph style to document.
Public method AddSection
Adds new section to document.
Public method AddStyle
Adds the style to the document style.
Public method Clone
Make deep copy of word document.
Public method CreateMinialDocument
If the document contains no sections, creates one section with one paragraph.
Public method CreateParagraph
Creates the paragraph.
Public method Encrypt
Encrypts the document.
Public method FindAllPattern
Finds and returns all entries of specified regular expression along with formatting.
Public method FindAllString
Finds and returns all entries of specified string along with formatting, taking into consideration caseSensitive and wholeWord options.
Public method FindPattern(Regex)
Finds and returns entry of specified regular expression along with formatting.
Public method FindPattern(BodyRegion, Regex)
Finds the next entry of matchString pattern.
Public method FindPatternInLine(Regex)
Finds the first entry of specified pattern in single-line mode.
Public method FindPatternInLine(BodyRegion, Regex)
Finds the next text which fit the specified pattern starting from start BodyRegion using single-line mode.
Public method FindString(String, Boolean, Boolean)
Finds and returns entry of specified string along with formatting, taking into consideration caseSensitive and wholeWord options.
Public method FindString(BodyRegion, String, Boolean, Boolean)
Finds the next entry of matchString string, taking into consideration caseSensitive and wholeWord options.
Public method FindStringInLine(String, Boolean, Boolean)
Finds the first entry of matchString text in single-line mode.
Public method FindStringInLine(BodyRegion, String, Boolean, Boolean)
Finds the next matchString text starting from specified. BodyRegion using single-line mode.
Public method GetNextWidgetSibling
Gets the next widget sibling.
(Inherited from IDocumentObject .)
Public method GetPreviousWidgetSibling
Gets the previous sibling.
(Inherited from IDocumentObject .)
Public method GetText
Gets the document's text.
Public method ImportContent(IDocument)
Imports all content into the document.
Public method ImportContent(IDocument, Boolean)
Imports all content into document.
Public method LoadFromFile(String)
Opens the document from file in Microsoft Word format.
Public method LoadFromFile(String, FileFormat)
Opens the document from file in Xml or Microsoft Word format.
Public method LoadFromFileInReadMode
LoadFromStream new document in read-only mode.
Public method LoadFromStream
Opens the document from stream in Xml or Microsoft Word format.
Public method Protect(ProtectionType)
Protects the document.
Public method Protect(ProtectionType, String)
Protects the document.
Public method RemoveEncryption
Removes the encryption.
Public method Replace(Regex, TextSelection)
Replaces all entries of matchString regular expression with TextRangesHolder.
Public method Replace(Regex, String)
Replaces all occurrences of a character pattern specified by a regular expression with newValue string.
Public method Replace(String, TextSelection, Boolean, Boolean)
Replaces all entries of matchString string with TextSelection, taking into consideration caseSensitive and wholeWord options.
Public method Replace(String, String, Boolean, Boolean)
Replaces all entries of matchString string with newValue string, taking into consideration caseSensitive and wholeWord options.
Public method ReplaceInLine(Regex, TextSelection)
Replaces the matchString pattern with matchSelection in single-line mode.
Public method ReplaceInLine(Regex, String)
Replaces all entries with specified pattern with newValue text in single-line mode.
Public method ReplaceInLine(String, TextSelection, Boolean, Boolean)
Replaces the matchString text with matchSelection in single-line mode.
Public method ReplaceInLine(String, String, Boolean, Boolean)
Replaces all entries of matchString text with newValue text in single-line mode.
Public method ResetFindState
Resets the FindPattern.
Public method SaveToFile(String)
Saves the document to file in Microsoft Word format.
Public method SaveToFile(Stream, FileFormat)
Saves the document to a stream in Xml or Microsoft Word format.
Public method SaveToFile(String, FileFormat)
Saves the document to file in Xml or Microsoft Word format.
Public method SaveToFile(String, FileFormat, HttpResponse, HttpContentType)
Streams the document to the client browser.
Public method SaveToImages(ImageType)
Converts the whole document into images
Public method SaveToImages(Int32, ImageType)
Converts the specified page into image
Public method SaveToImages(Int32, ImageFormat)
Converts the specified page into image
Public method SaveToImages(Int32, Int32, ImageType)
Converts the specified range of pages into images
Public method UpdateWordCount
Update Paragraphs count, Word count and Character count
Top
See Also