This class is used to represent a region of the document that can be edited. This is the main class for manipulating the Word object model. Most elements of a Document inherit from the Element class.
| Returns | Signature and Description |
|
void
|
CreateBookmark ( String
name
)
Creates a bookmark on this Element with the specified name
|
|
Section
|
CreateSectionAfter ( )
Creates and returns a Section object that represents a new section at the end of this Element
|
|
Section
|
CreateSectionBefore ( )
Creates and returns a Section object that represents a new section at the beginning of this Element
|
|
void
|
DeleteElement ( )
Deletes all the text and properties of this Element
|
|
Position
|
GetPosition ( int
offset
)
Returns a Position object that represents the location specified by the offset
|
|
Table
|
ImportData ( Object[,]
data
)
Imports the data from a rectangular array into a Table at the point of the current element in the document
|
|
Table
|
ImportData ( Object[,]
data
, String[]
columnNames
, DataImportProperties
props
)
Imports the data from a rectangular array into a Table at the point of the current element in the document
|
|
Table
|
ImportData ( Object[][]
data
)
Imports the data from a 2-dimensional array into a Table at the point of the current element in the document
|
|
Table
|
ImportData ( Object[][]
data
, String[]
columnNames
, DataImportProperties
properties
)
Imports a set of data from an array of column names and a 2-dimensional array of data to a Table created at the point of the current element in the document
|
|
Table
|
ImportData ( System.Data.DataTable
data
)
Imports data from a DataTable into a Table at the point of this Element in the document
|
|
Table
|
ImportData ( System.Data.DataTable
data
, DataImportProperties
props
)
Imports data from a DataTable into a Table at the point of this Element in the document
|
|
Table
|
ImportData ( System.Data.DataView
data
)
Imports data from a DataView into a Table at the point of this Element in the document
|
|
Table
|
ImportData ( System.Data.DataView
data
, DataImportProperties
props
)
Imports data from a DataView into a Table at the point of this Element in the document
|
|
Table
|
ImportData ( System.Data.IDataReader
data
)
Imports the data from a DataReader into a Table at the point of the current element in the document
|
|
Table
|
ImportData ( System.Data.IDataReader
data
, DataImportProperties
props
)
Imports the data from a DataReader into a Table at the point of the current element in the document
|
|
void
|
InsertAfter ( Element
element
)
Inserts an existing element after this element
|
|
void
|
InsertBefore ( Element
element
)
Inserts an existing element before this element
|
|
void
|
InsertBreakAfter ( Element.BreakType
type
)
|
|
void
|
InsertBreakBefore ( Element.BreakType
type
)
|
|
Hyperlink
|
InsertHyperlinkAfter ( String
url
, String
display
)
Creates and returns a Hyperlink at the beginning of this Element
|
|
Hyperlink
|
InsertHyperlinkBefore ( String
url
, String
display
)
Creates and returns a Hyperlink at the beginning of this Element
|
|
InlineImage
|
InsertImageAfter ( String
fileName
)
Inserts and returns an InlineImage at the end of this Element
|
|
InlineImage
|
InsertImageAfter ( System.IO.Stream
stream
)
Inserts and returns an InlineImage at the end of this Element
|
|
InlineImage
|
InsertImageBefore ( String
fileName
)
Inserts and returns an InlineImage at the beginning of this Element
|
|
InlineImage
|
InsertImageBefore ( System.IO.Stream
stream
)
Inserts and returns an InlineImage at the beginning of this Element
|
|
List
|
InsertListAfter ( boolean
numbered
)
Creates and returns an empty List at the end of this Element
|
|
List
|
InsertListBefore ( boolean
numbered
)
Creates and returns an empty List at the beginning of this Element
|
|
MergeField
|
InsertMergeFieldAfter ( String
fieldName
, String
display
)
Creates and returns a MergeField at the end of this Element
|
|
MergeField
|
InsertMergeFieldBefore ( String
fieldName
, String
display
)
Creates and returns a MergeField at the beginning of this Element
|
|
Paragraph
|
InsertParagraphAfter ( NamedStyle
style
)
Creates and returns a Paragraph object that represents a new empty paragraph at the end of this Element
|
|
Paragraph
|
InsertParagraphAfter ( NamedStyle
style
, ParagraphFormatting
props
)
Creates and returns a Paragraph object that represents a new empty paragraph at the end of this Element
|
|
Paragraph
|
InsertParagraphBefore ( NamedStyle
style
)
Creates and returns a Paragraph object that represents a new empty paragraph at the beginning of this Element
|
|
Paragraph
|
InsertParagraphBefore ( NamedStyle
style
, ParagraphFormatting
props
)
Creates and returns a Paragraph object that represents a new empty paragraph at the beginning of this Element
|
|
Table
|
InsertTableAfter ( int
rows
, int
columns
)
Creates and returns a Table at the end of this Element
|
|
Table
|
InsertTableAfter ( int
rows
, int
columns
, TableFormatting
props
)
Creates and returns a Table at the end of this Element
|
|
Table
|
InsertTableBefore ( int
rows
, int
columns
)
Creates and returns a Table at the beginning of this Element
|
|
Table
|
InsertTableBefore ( int
rows
, int
columns
, TableFormatting
props
)
Creates and returns a Table at the beginning of this Element
|
|
CharacterRun
|
InsertTextAfter ( String
text
, boolean
newRun
)
Creates and returns a CharacterRun at the end of this Element
|
|
CharacterRun
|
InsertTextAfter ( String
text
, Font
props
)
Creates and returns a CharacterRun at the end of this Element
|
|
CharacterRun
|
InsertTextBefore ( String
text
, boolean
newRun
)
Creates and returns a CharacterRun at the beginning of this Element
|
|
CharacterRun
|
InsertTextBefore ( String
text
, Font
props
)
Creates and returns a CharacterRun at the beginning of this Element
|
|
SearchMatch[]
|
Search ( String
toMatch
)
Searches for a specified string and returns an Iterator that can be used to
iterate over the results.
|
|
int
|
SearchAndReplace ( String
search
, String
replaceWith
)
Searches for a string specified by the search parameter, and
replaces it with the string specified by the replaceWith parameter.
|
|
Element
|
SubElement ( int
start
, int
end
)
Creates and returns a Element object that represents a sub Element within this Element based on the specified start and end offsets
|