Tries to find the license in the following locations:
1. Explicit path.
2. The folder that contains the Aspose component assembly.
3. The folder that contains the client's calling assembly.
4. The folder that contains the entry (startup) assembly.
5. An embedded resource in the client's calling assembly.
Note:On the .NET Compact Framework, tries to find the license only in these locations:
1. Explicit path.
2. An embedded resource in the client's calling assembly.
Use this method to load a license from a stream.
CertificateHolder can be created by static factory methods only.
It contains an instance of
certBytes is nullpassword is nullcertBytes is nullpassword is nullfileName is nullpassword is nullfileName is nullpassword is nullThe index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
A document is represented as a tree of nodes, similar to DOM or XmlDocument.
For more info see the Composite design pattern.
The
A document is represented as a tree of nodes, similar to DOM or XmlDocument.
For more info see the Composite design pattern.
The
This method serves as a copy constructor for nodes. The cloned node has no parent, but belongs to the same document as the original node.
This method always performs a deep copy of the node. The isCloneChildren parameter specifies whether to perform copy all child nodes as well.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
The returned string includes all control and special characters as described in
The ancestor type matches if it is equal to ancestorType or derived from ancestorType.
This method removes field codes and Microsoft Word control characters, uses CrLf
(or any other) combination of characters to mark ends of paragraphs in the resulting string.
It produces a different result from
If a node has just been created and not yet added to the tree, or if it has been removed from the tree, the parent is null.
The node always belongs to a document even if it has just been created and not yet added to the tree, or if it has been removed from the tree.
The returned string includes all control and special characters as described in
The collection of nodes returned by this method is always live.
A live collection is always in sync with the document. For example, if you selected all sections in a document and enumerate through the collection deleting the sections, the section is removed from the collection immediately when it is removed from the document.
This method is obsolete.
If index is out of range, a null is returned.
Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.
Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.
If the newChild is already in the tree, it is first removed.
If the node being inserted was created from another document, you should use
If the newChild is already in the tree, it is first removed.
If the node being inserted was created from another document, you should use
If refChild is null, inserts newChild at the beginning of the list of child nodes.
If the newChild is already in the tree, it is first removed.
If the node being inserted was created from another document, you should use
If refChild is null, inserts newChild at the end of the list of child nodes.
If the newChild is already in the tree, it is first removed.
If the node being inserted was created from another document, you should use
The parent of oldChild is set to null after the node is removed.
Note,
If there are no child nodes, this property returns an empty collection.
This namespace contains classes of the Aspose.Words' new reporting engine that supports report templates marked up with a language based on the LINQ Method Syntax.
This new reporting engine is more advanced than the original mail merge reporting engine
With DocumentVisitor you can define and execute custom operations that require enumeration over the document tree.
For example, Aspose.Words uses DocumentVisitor internally for saving Document in various formats and for other operations like finding fields or bookmarks over a fragment of a document.
To use DocumentVisitor:
DocumentVisitor provides default implementations for all of the VisitXXX methods to make it easier to create new document visitors as only the methods required for the particular visitor need to be overridden. It is not necessary to override all of the visitor methods.
For more information see the Visitor design pattern.
A field in a Word Word document consists of a field code and field value.
For example, a field that displays a page number can be represented as follows:
[FieldStart]PAGE[FieldSeparator]98[FieldEnd]
The field separator separates field code from field value in the document. Note that some fields have only field code and do not have field separator and field value.
Fields can be nested.
The field separator separates field code from field value in the document. Note that some fields have only field code and do not have field separator and field value.
For more info see
For more info see
The Aspose.Words.Layout namespace provides classes that allow to access information such as on what page and where on a page particular document elements are positioned, when the document is formatted into pages.
Document should be either
Document should be either
Output will be written to the start of stream and stream size will be updated with content length.
Output will be written to the start of stream and stream size will be updated with content length.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
This editor can be stored in one of the following forms:
DOMAIN\Username - for users whose access shall be authenticated using the current user's domain credentials.
user@domain.com - for users whose access shall be authenticated using the user's e-mail address as credentials.
user - for users whose access shall be authenticated using the current user's machine credentials.
Single user and editor group cannot be set simultaneously for the specific editable range, if the one is set, the other will be clear.
Single user and editor group cannot be set simultaneously for the specific editable range, if the one is set, the other will be clear.
A complete editable range in a Word document consists of a
Use the
Calls
For more info see the Visitor design pattern.
A complete editable range in a Word document consists of a
Use the
Calls
For more info see the Visitor design pattern.
Set to true to make HTML, MHTML, EPUB, WordML, RTF, DOCX and ODT output human readable. Useful for testing or debugging.
This property is obsolete. Please use
Use this property to get or set the quality of the images inside a document when saving in PS format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression.
The default value is 95.
Aspose.Words automatically generates a unique file name for every resource when exporting to fixed page HTML or SVG format. How the resource file name is generated depends on whether you save the document to a file or to a stream.
When saving a document to a file, the generated resource file name looks like <document base file name>.<image number>.<extension>.
When saving a document to a stream, the generated resource file name looks like Aspose.Words.<document guid>.<image number>.<extension>.
Has effect only if
When you save a
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the
images in the same folder where the document file is saved. Use
If you save a document into a stream, Aspose.Words does not have a folder where to save the images,
but still needs to save the images somewhere. In this case, you need to specify an accessible folder
by using the
When you save a
Use this property to get or set the quality of the images inside a document when saving in Html format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression.
The default value is 95.
Use this property to get or set the mode of how metafile images inside a document should be rendered when saving in Html format.
The default value is
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
This option is used only when metafile is rendered as vector graphics. When metafile is rendered to bitmap, EMF+ part is always used.
The default value is
When this value is set to
When this value is set to
This option is used only when metafile is rendered as vector graphics. When metafile is rendered to bitmap, WMF data is always used.
The default value is
When this value is set to
When this value is set to
This option is used only when metafile is rendered as vector graphics.
The default value is
This property is used to resolve relative URIs into absolute in the following cases:
By default, the INCLUDEPICTURE field is converted into a shape object. You can override that if you need the field to be preserved, for example, if you wish to update it programmatically. Note however that this approach is not common for Aspose.Words. Use it on your own risk.
One of the possible use cases may be using a MERGEFIELD as a child field to dynamically change the source path of the picture. In this case you need the INCLUDEPICTURE to be preserved in the model.
Retrieves the name of the current document from its storage location.
In the current implementation, uses the
Retrieves the size of the current document's file or 0 if the size cannot be determined.
In the current implementation, uses the
Compares the values designated by the expressions
A field in the following format will be used as a mail merge source: { IF 0 = 0 "{PatientsNameFML}" "" \* MERGEFORMAT }
Allows a macro or command to be run.
In Aspose.Words this field can also act as a merge field.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
The Aspose.Words.Math namespace contains classes that represent Office Math elements.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
A complete bookmark in a Word document consists of a
Use the
Calls
For more info see the Visitor design pattern.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
Returns null if the bookmark with the specified name cannot be found.
A complete bookmark in a Word document consists of a
Use the
Calls
For more info see the Visitor design pattern.
Borders can be applied to various document elements including paragraph, run of text inside a paragraph or a table cell.
If you set line width greater than zero when line style is none, the line style is automatically changed to single line.
In Microsoft Word, for a border to have a shadow, the borders on all four sides (left, top, right and bottom) should be of the same type, width, color and all should have the Shadow property set to true.
Note that not all borders are present for different document elements. This method throws an exception if you request a border not applicable to the current object.
Returns the width of the first border in the collection.
Sets the width of all borders in the collection excluding diagonal borders.
Returns the style of the first border in the collection.
Sets the style of all borders in the collection excluding diagonal borders.
Returns the color of the first border in the collection.
Sets the color of all borders in the collection excluding diagonal borders.
Gets the distance from text for the first border.
Sets the distance from text for all borders in the collection excluding diagonal borders.
Has no effect and will be automatically reset to zero for borders of table cells.
Gets the value from the first border in the collection.
Sets the value for all borders in the collection excluding diagonal borders.
When
To append
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
NodeCollection does not own the nodes it contains, rather, is just a selection of nodes of the specified type, but the nodes are stored in the tree under their respective parent nodes.
NodeCollection supports indexed access, iteration and provides add and remove methods.
The NodeCollection collection is "live", i.e. changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the NodeCollection properties and methods.
NodeCollection is returned by
NodeCollection can be "flat" and contain only immediate children of the node it was created from, or it can be "deep" and contain all descendant children.
The node is inserted as a child into the node object from which the collection was created.
If the newChild is already in the tree, it is first removed.
If the node being inserted was created from another document, you should use
The node is inserted as a child into the node object from which the collection was created.
If the index is equal to or greater than Count, the node is added at the end of the collection.
If the index is negative and its absolute value is greater than Count, the node is added at the end of the collection.
If the newChild is already in the tree, it is first removed.
If the node being inserted was created from another document, you should use
This method performs a linear search; therefore, the average execution time is proportional to Count.
This method performs a linear search; therefore, the average execution time is proportional to Count.
You should not be adding/removing nodes while iterating over a collection of nodes because it invalidates the iterator and requires refreshes for live collections.
To be able to add/remove nodes during iteration, use this method to copy nodes into a fixed-size array and then iterate over the array.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
Imports a node from another document to the current document.
This method uses the
Importing a node creates a copy of the source node belonging to the importing document. The returned node has no parent. The source node is not altered or removed from the original document.
Before a node from another document can be inserted into this document, it must be imported.
During import, document-specific properties such as references to styles and lists are translated
from the original to the importing document. After the node was imported, it can be inserted
into the appropriate place in the document using
If the source node already belongs to the destination document, then simply a deep clone of the source node is created.
Imports a node from another document to the current document.
This method uses the
Importing a node creates a copy of the source node belonging to the importing document. The returned node has no parent. The source node is not altered or removed from the original document.
Before a node from another document can be inserted into this document, it must be imported.
During import, document-specific properties such as references to styles and lists are translated
from the original to the importing document. After the node was imported, it can be inserted
into the appropriate place in the document using
If the source node already belongs to the destination document, then simply a deep clone of the source node is created.
Imports a node from another document to the current document with an option to control formatting.
This overload is useful to control how styles and list formatting are imported.
Importing a node creates a copy of the source node belonging to the importing document. The returned node has no parent. The source node is not altered or removed from the original document.
Before a node from another document can be inserted into this document, it must be imported.
During import, document-specific properties such as references to styles and lists are translated
from the original to the importing document. After the node was imported, it can be inserted
into the appropriate place in the document using
If the source node already belongs to the destination document, then simply a deep clone of the source node is created.
Imports a node from another document to the current document with an option to control formatting.
Importing a node creates a copy of the source node belonging to the importing document. The returned node has no parent. The source node is not altered or removed from the original document.
Before a node from another document can be inserted into this document, it must be imported.
During import, document-specific properties such as references to styles and lists are translated
from the original to the importing document. After the node was imported, it can be inserted
into the appropriate place in the document using
If the source node already belongs to the destination document, then simply a deep clone of the source node is created.
For more information see the description of the
For more information see the description of the
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
The Aspose.Words.BuildingBlocks namespace provides classes that allow to access and use AutoText, AutoCorrect entries and Building Blocks in a document.
Use this property to get or set the mode of how text inside a document should be rendered when saving in SVG format.
The default value is
Has effect only if
When you save a
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the
images in the same folder where the document file is saved. Use
If you save a document into a stream, Aspose.Words does not have a folder where to save the images,
but still needs to save the images somewhere. In this case, you need to specify an accessible folder
in the
When you save a
Use this property to get or set the quality of the images inside a document when saving in SVG format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression.
The default value is 95.
The default value is false.
Use this property to get or set the mode of how metafile images inside a document should be rendered when saving in SVG format.
The default value is
A Microsoft Word document can include a number of special characters
that represent fields, form fields, shapes, OLE objects, footnotes etc. For the list
of special characters see
SpecialChar is an inline-node and can only be a child of Paragraph.
SpecialChar char is used as a base class for more specific classes that represent special characters that Aspose.Words provides programmatic access for. The SpecialChar class is also used itself to represent special character for which Aspose.Words does not provide detailed programmatic access.
A class derived from Inline can be a child of Paragraph.
Calls DocumentVisitor.VisitSpecialChar.
For more info see the Visitor design pattern.
Calls DocumentVisitor.VisitAbsolutePositionTab.
For more info see the Visitor design pattern.
When you save a
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the
images in the same folder where the document file is saved. Use
If you save a document into a stream, Aspose.Words does not have a folder where to save the images,
but still needs to save the images somewhere. In this case, you need to specify an accessible folder
by using the
When you save a
When Aspose.Words saves a document to HTML or related formats and
Class
To save document parts into streams instead of files, use the
This property allows you to redefine how the document part file names are generated during export to HTML or EPUB.
When the callback is invoked, this property contains the file name that was generated by Aspose.Words. You can change the value of this property to save the document part into a different file. Note that the file name for each part must be unique.
Default is
This property allows you to save document parts to streams instead of files during HTML export.
The default value is
When saving to a stream in HTML format is requested by
When saving to EPUB format that is a container format based on HTML,
Different criteria can partially overlap. For instance, Heading 1 style is frequently given
This property contains the original file name of the current font if it is known. Otherwise it can be an empty string.
This property contains the original file size of the current font if it is known. Otherwise it can be zero.
Fonts can be exported as complete original font files or subsetted to include only the characters that are used in the document. Subsetting allows to reduce the resulting font resource size.
Aspose.Words automatically generates a unique file name for every embedded font when exporting to HTML format. How the font file name is generated depends on whether you save the document to a file or to a stream.
When saving a document to a file, the generated font file name looks like <document base file name>.<original file name><optional suffix>.<extension>.
When saving a document to a stream, the generated font file name looks like Aspose.Words.<document guid>.<original file name><optional suffix>.<extension>.
When negative indent is not allowed, it is exported as zero margin to HTML. When negative indent is allowed, a paragraph might appear partially outside of the browser window.
When negative indent is not allowed, it is exported as zero margin to HTML. When negative indent is allowed, a paragraph might appear partially outside of the browser window.
This property has effect only when saving a document to HTML format
and external CSS style sheet is requested using
Saving CSS style sheet into an external file is only supported when saving to HTML.
When you are exporting to one of the container formats (EPUB or MHTML) and specifying
Normally you would want a document saved to HTML as a single file. But in some cases it is preferable to split the output into several smaller HTML pages. When saving to HTML format these pages will be output to individual files or streams. When saving to EPUB format they will be incorporated into corresponding packages.
A document cannot be split when saving in the MHTML format.
When
By default, only Heading 1 and Heading 2 paragraphs cause the document to be split. Setting this property to zero will cause the document not to be split at heading paragraphs at all.
Navigation map in IDPF EPUB format allows user agents to provide easy way of navigation
through the document structure. Usually navigation points correspond to headings in the document.
To populate headings up to level N assign this value to
By default, three levels of headings are populated: paragraphs of styles Heading 1, Heading 2 and Heading 3. You can set this property to a value from 1 to 9 to request corresponding maximum level. Setting it to zero will reduce navigation map to only document root or roots of document parts.
Exporting font resources allows for consistent document rendering independent of the fonts available in a given user's environment.
If
Important! When exporting font resources, font licensing issues should be considered. Authors who want to use specific fonts via a downloadable font mechanism must always carefully verify that their intended use is within the scope of the font license. Many commercial fonts presently do not allow web downloading of their fonts in any form. License agreements that cover some fonts specifically note that usage via @font-face rules in CSS style sheets is not allowed. Font subsetting can also violate license terms.
This property is obsolete. Please use
It is hard to meaningfully output headers and footers to HTML because HTML is not paginated.
When this property is
When this property is set to
When this property is set to
Metafiles are not natively displayed by HTML browsers. By default, Aspose.Words converts WMF and EMF
images into PNG files when exporting to HTML. Setting this property to
Some image transforms, in particular image cropping, will not be applied to metafile images if this
property is
Each
In most cases HTML is intended for viewing in browsers where pagination is not performed. So this feature is inactive by default.
In many existing documents (HTML, IDPF EPUB) font sizes are specified in relative units. This allows applications
to adjust text size when viewing/processing documents. For instance, Microsoft Internet Explorer has "View->Text Size" submenu,
Adobe Digital Editions has two buttons: Increase/Decrease Text Size. If you expect this functionality to work then set
Aspose Words document model contains and operates only with absolute font size units. Relative units need additional logic to be recalculated from some initial (standard) size. Font size of Normal document style is taken as standard. For instance, if Normal has 12pt font and some text is 18pt then it will be output as 1.5em. to the HTML.
When this option is enabled, document elements other than text will still have absolute sizes. Also some
text-related attributes might be expressed absolutely. In particular, line spacing specified with "exactly" rule
might produce unwanted results when scaling text. So the source documents should be properly designed and tested
when exporting with
When set to
When exporting to EPUB, text input form fields are always saved as text due to requirements of this format.
When set to
When exporting to EPUB, text drop-down form fields are always saved as text due to requirements of this format.
Aspose.Words always writes well formed HTML regardless of this setting.
When
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Aspose.Words aims to output XHTML according to the XHTML 1.0 Transitional specification, but the output will not always validate against the DTD. Some structures inside a Microsoft Word document are hard or impossible to map to a document that will validate against the XHTML schema. For example, XHTML does not allow nested lists (UL cannot be nested inside another UL element), but in Microsoft Word document multilevel lists occur quite often.
Saving of the roundtrip information allows to restore document properties such as tab stops,
comments, headers and footers during the HTML documents loading back into a
When
When
When you save a
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the
fonts in the same folder where the document file is saved. Use
If you save a document into a stream, Aspose.Words does not have a folder where to save the fonts,
but still needs to save the fonts somewhere. In this case, you need to specify an accessible folder
in the
When you save a
If
If
If
Important! When exporting font resources, font licensing issues should be considered. Authors who want to use specific fonts via a downloadable font mechanism must always carefully verify that their intended use is within the scope of the font license. Many commercial fonts presently do not allow web downloading of their fonts in any form. License agreements that cover some fonts specifically note that usage via @font-face rules in CSS style sheets is not allowed. Font subsetting can also violate license terms.
When you save a
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the
images in the same folder where the document file is saved. Use
If you save a document into a stream, Aspose.Words does not have a folder where to save the images,
but still needs to save the images somewhere. In this case, you need to specify an accessible folder
in the
When you save a
If
If
If
An image in a Microsoft Word document is a shape. The shape has a size and the image has its own size. The sizes are not directly linked. For example, the image can be 1024x786 pixels, but shape that displays this image can be 400x300 points.
In order to display an image in the browser, it must be scaled to the shape size.
The
When
In general, browsers do quick and poor quality scaling. As a result, you will normally get better
display quality in the browser and smaller file size when
Microsoft Word provides the following form fields: checkbox, text input and dropdown (combobox).
FormField is an inline-node and can only be a child of Paragraph.
FormField is represented in a document by a special character and positioned as a character within a line of text.
A complete form field in a Word document is a complex structure represented by several
nodes: field start, field code such as FORMTEXT, form field data, field separator,
field result, field end and a bookmark. To programmatically create form fields in a Word document use
Calls DocumentVisitor.VisitFormField.
For more info see the Visitor design pattern.
For a text form field the result is the text that is in the field.
For a checkbox form field the result can be "1" or "0" to indicate checked or unchecked.
For a dropdown form field the result is the string selected in the dropdown.
Setting
If the OwnStatus property is set to true, the StatusText property specifies the status bar text. If the OwnStatus property is set to false, the StatusText property specifies the name of an AutoText entry that contains status bar text for the form field.
If true, the text specified by the StatusText property is displayed. If false, the text of the AutoText entry specified by the StatusText property is displayed.
If the OwnHelp property is set to True, HelpText specifies the text string value. If OwnHelp is set to False, HelpText specifies the name of an AutoText entry that contains help text for the form field.
If True, the text specified by the HelpText property is displayed. If False, the text in the AutoText entry specified by the HelpText property is displayed.
Setting CalculateOnExit only affects the behavior of the form field when the document is opened in Microsoft Word. Aspose.Words never updates references to the form field.
The exit macro runs when the form field loses the focus in Microsoft Word.
If a form field is enabled, its contents can be changed as the form is filled in.
If the text form field contains regular text, then valid format strings are "", "UPPERCASE", "LOWERCASE", "FIRST CAPITAL" and "TITLE CASE". The strings are case-insensitive.
If the text form field contains a number or a date/time value, then valid format strings are number or date and time format strings.
Microsoft Word allows maximum 25 items in a dropdown form field.
Applicable for a check box form field only.
Applicable for a check box form field only.
Applicable for a check box form field only.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
A complete field in a Microsoft Word document is a complex structure consisting of a field start character, field code, field separator character, field result and field end character. Some fields only have field start, field code and field end.
To easily insert a new field into a document, use the
A complete field in a Microsoft Word document is a complex structure consisting of a field start character, field code, field separator character, field result and field end character. Some fields only have field start, field code and field end.
To easily insert a new field into a document, use the
Calls
For more info see the Visitor design pattern.
A complete field in a Microsoft Word document is a complex structure consisting of a field start character, field code, field separator character, field result and field end character. Some fields only have field start, field code and field end.
To easily insert a new field into a document, use the
Calls
For more info see the Visitor design pattern.
A complete field in a Microsoft Word document is a complex structure consisting of a field start character, field code, field separator character, field result and field end character. Some fields only have field start, field code and field end.
To easily insert a new field into a document, use the
Calls
For more info see the Visitor design pattern.
NodeList is returned by
NodeList supports indexed access and iteration.
You should not be adding/removing nodes while iterating over a collection of nodes because it invalidates the iterator and requires refreshes for live collections.
To be able to add/remove nodes during iteration, use this method to copy nodes into a fixed-size array and then iterate over the array.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
Enumerated node types are provided as a common denominator to ensure all functionality is accessible to all clients (including COM applications that might not have full access to the runtime type information).
A
A
A
A
A
A
A
A
A
A
A row of a table.
A
A cell of a table row.
A
A paragraph of text.
A
A beginning of a bookmark marker.
An end of a bookmark marker.
A beginning of an editable range.
An end of an editable range.
A beginning of an MoveFrom range.
An end of an MoveFrom range.
A beginning of an MoveTo range.
An end of an MoveTo range.
A group of shapes, images, OLE objects or other group shapes.
A
A drawing object, such as an OfficeArt shape, image or an OLE object.
A
A comment in a Word document.
A
A footnote or endnote in a Word document.
A
A run of text.
A special character that designates the start of a Word field.
A special character that separates the field code from the field result.
A special character that designates the end of a Word field.
A form field.
A special character that is not one of the more specific special character types.
Use this property to get or set the quality of the images inside a document when saving in PDF format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression. If quality is 100 and source image is JPEG, it means no compression - original bytes will be saved.
The default value is 100.
Use this property to get or set the mode of how metafile images inside a document should be rendered when saving in PDF format.
The default value is
Use this property to get or set the quality of the images inside a document when saving in SWF format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression.
The default value is 95.
It is hard to meaningfully output headers and footers to plain text because it is not paginated. When this property is true, Aspose.Words exports only primary headers and footers at the beginning and end of each section. You can disable export of headers and footers altogether by setting this property to false.
The default value is
When you save a
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the
images in the same folder where the document file is saved. Use
If you save a document into a stream, Aspose.Words does not have a folder where to save the images,
but still needs to save the images somewhere. In this case, you need to specify an accessible folder
in the
When you save a
If
If
If
Use this property to get or set the mode of how metafile images inside a document should be rendered when saving in XPS format.
The default value is
When
To append a
Calls
For more info see the Visitor design pattern.
When
To append a
Calls
For more info see the Visitor design pattern.
Represents the color scheme of the document theme which contains twelve colors.
ThemeColors object contains six accent colors, two dark colors, two light colors and a color for each of a hyperlink and followed hyperlink.
The Aspose.Words.Settings namespace contains classes and enums that are used when specifying various settings and options stored in a document. These are mail merge, write protection, compatibility and other settings.
The Aspose.Words.Fonts namespace provides classes and enumerations to access information about fonts used in a document.
Can not be empty string.
If there already is a style with such name in the collection, then this style will override it. All affected nodes will reference new style.
The Document is a central object in the Aspose.Words library.
To load an existing document in any of the
Use one of the Save method overloads to save the document in any of the
Document stores document-wide information such as
The Document is a root node of a tree that contains all other nodes of the document. The tree is a Composite design pattern and in many ways similar to XmlDocument. The content of the document can be manipulated freely programmatically:
Consider using
The Document can contain only
In Microsoft Word, a valid document needs to have at least one section.
The document paper size is Letter by default. If you want to change page setup, use
After creation, you can use
The document must be stored at the beginning of the stream. The stream must support random positioning.
The document must be stored at the beginning of the stream. The stream must support random positioning.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
When a document is protected, the user can make only limited changes, such as adding annotations, making revisions, or completing a form.
When you protect a document, and the document already has a protection password, the existing protection password is not changed.
When you protect a document, and the document does not have a protection password, this method assigns a random password that makes it impossible to unprotect the document in Microsoft Word, but you still can unprotect the document in Aspose.Words as it does not require a password when unprotecting.
When a document is protected, the user can make only limited changes, such as adding annotations, making revisions, or completing a form.
UpdateWordCount recalculates and updates Characters, Words and Paragraphs
properties in the
Note that UpdateWordCount does not update number of lines and pages properties.
When you use an evaluation version, the evaluation watermark will also be included in the word count.
You do not normally need to call this method as cell and table widths are maintained automatically. You can call this method before exporting to PDF (or any other fixed-page format), only in rare cases where you confirmed that tables appear incorrectly laid out in the output document. Calling this method might help to correct the output.
By removing all macros from a document you can ensure the document contains no macro viruses.
This method does not update all field types. For the detailed list of supported field types, see the Programmers Guide.
This is an optimization method. Some documents contain adjacent runs with same formatting. Usually this occurs if a document was intensively edited manually. You can reduce the document size and speed up further processing by joining these runs.
The operation checks every
If you call this method and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
Currently Aspose.Words supports tracking of node insertions and deletions only. Formatting changes are not recorded as revisions.
Automatic tracking of changes is supported both when modifying this document through node manipulations
as well as when using
This method does not change the
If you call this method and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
Currently Aspose.Words supports tracking of node insertions and deletions only. Formatting changes are not recorded as revisions.
Automatic tracking of changes is supported both when modifying this document through node manipulations
as well as when using
This method does not change the
Empty string means the document is attached to the Normal template.
Setting this option only instructs Microsoft Word whether the track changes is turned on or off. This property has no effect on changes to the document that you make programmatically via Aspose.Words.
If you want to automatically track changes as they are made programmatically by Aspose.Words
to this document use the
This property allows to retrieve the currently set document protection type.
To change the document protection type use the
When a document is protected, the user can make only limited changes, such as adding annotations, making revisions, or completing a form.
Versions in Microsoft Word are accessed via the File/Versions menu. Microsoft Word supports versions only for DOC files.
This property allows to detect if there were document versions stored in this document before it was opened in Aspose.Words. Aspose.Words provides no other support for document versions. If you save this document using Aspose.Words, the document will be saved without versions.
Returns null if the document was loaded from a stream or created blank.
DocumentBuilder makes the process of building a Document easier. Document is a composite object consisting of a tree of nodes and while inserting content nodes directly into the tree is possible, it requires good understanding of the tree structure. DocumentBuilder is a "facade" for the complex structure of Document and allows to insert content and formatting quickly and easily.
Create a DocumentBuilder and associate it with a
The DocumentBuilder has an internal cursor where the text will be inserted
when you call
Use the
Use the
Use the
Use the
Note that Font, ParagraphFormat and PageSetup properties are updated whenever you navigate to a different place in the document to reflect formatting properties available at the new location.
When sectionIndex is greater than or equal to 0, it specifies an index from the beginning of the document with 0 being the first section. When sectionIndex is less than 0, it specified an index from the end of the document with -1 being the last section.
The cursor is moved to the first paragraph in the Body of the specified section.
After you moved the cursor into a header or footer, you can use the rest of DocumentBuilder methods to modify the contents of the header or footer.
If you want to create headers and footers different for the first page, you need
to set
If you want to create headers and footers different for even and odd pages, you need
to set
Use
Note that this method deletes the merge field from the document after moving the cursor.
Moves the cursor to a position just after the start of the bookmark with the specified name.
The comparison is not case-sensitive. If the bookmark was not found, false is returned and the cursor is not moved.
Inserting new text does not replace existing text of the bookmark.
Note that some bookmarks in the document are assigned to form fields. Moving to such a bookmark and inserting text there inserts the text into the form field code. Although this will not invalidate the form field, the inserted text will not be visible because it becomes part of the field code.
Moves the cursor to a position before or after the bookmark start or end.
The comparison is not case-sensitive. If the bookmark was not found, false is returned and the cursor is not moved.
The navigation is performed inside the current story of the current section. That is, if you moved the cursor to the primary header of the first section, then paragraphIndex specified the index of the paragraph inside that header of that section.
When paragraphIndex is greater than or equal to 0, it specifies an index from the beginning of the section with 0 being the first paragraph. When paragraphIndex is less than 0, it specified an index from the end of the section with -1 being the last paragraph.
The navigation is performed inside the current story of the current section.
For the index parameters, when index is greater than or equal to 0, it specifies an index from the beginning with 0 being the first element. When index is less than 0, it specified an index from the end with -1 being the last element.
When node is an inline-level node, the cursor is moved to this node and further content will be inserted before that node.
When node is a Paragraph, the cursor is moved to the end of the paragraph and further content will be inserted just before the paragraph break.
If the cursor is inside the row that is being deleted, the cursor is moved out to the next row or to the next paragraph after the table.
If you delete a row from a table that contains only one row, the whole table is deleted.
For the index parameters, when index is greater than or equal to 0, it specifies an index from the beginning with 0 being the first element. When index is less than 0, it specified an index from the end with -1 being the last element.
Calls
Current paragraph formatting specified by the
Breaks the current paragraph in two. After inserting the paragraph, the cursor is placed at the beginning of the new paragraph.
This method inserts a TOC (table of contents) field into the document at the current position.
A table of contents in a Word document can be built in a number of ways and formatted using a variety of options. The way the table is built and displayed by Microsoft Word is controlled by the field switches.
The easiest way to specify the switches is to insert and configure a table of contents into a Word document using the Insert->Reference->Index and Tables menu, then switch display of field codes on to see the switches. You can press Alt+F9 in Microsoft Word to toggle display of field codes on or off.
For example, after creating a table of contents, the following field is inserted into the document: { TOC \o "1-3" \h \z \u }. You can copy \o "1-3" \h \z \u and use it as the switches parameter.
Note that InsertTableOfContents will only insert a TOC field, but will not actually build the table of contents. The table of contents is built by Microsoft Word when the field is updated.
If you insert a table of contents using this method and then open the file in Microsoft Word, you will not see the table of contents because the TOC field has not yet been updated.
In Microsoft Word, fields are not automatically updated when a document is opened, but you can update fields in a document at any time by pressing F9.
Fields in Microsoft Word documents consist of a field code and a field result. The field code is like a formula and the field result is like the value that the formula produces. The field code may also contain field switches that are like additional instructions to perform a specific action.
You can switch between displaying field codes and results in your document in Microsoft Word using the keyboard shortcut Alt+F9. Field codes appear between curly braces ( { } ).
To create a field, you need to specify a field type, field code and a "placeholder" field value. If you are not sure about a particular field code syntax, create the field in Microsoft Word first and switch to see its field code.
Note that you need to specify font formatting for the hyperlink display text explicitly
using the
This methods internally calls
If you specify a name for the form field, then a bookmark is automatically created with the same name.
If you specify a name for the form field, then a bookmark is automatically created with the same name.
If you specify a name for the form field, then a bookmark is automatically created with the same name.
You can change the image size, location, positioning method and other settings using the
This overload will automatically download the image before inserting into the document if you specify a remote URI.
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can use InsertHtml to insert an HTML fragment or whole HTML document.
You can use InsertHtml to insert an HTML fragment or whole HTML document.
You can change the image size, location, positioning method and other settings using the
You can change the image size, location, positioning method and other settings using the
You can use InsertHtml to insert an HTML fragment or whole HTML document.
To start a table, just call InsertCell. After this, any content you add using
other methods of the
To start a new cell in the same row, call InsertCell again.
To end a table row call
Use the
The next method to call is
This method starts a nested table when called inside a cell.
This method should be called only once after
Call EndRow to end a table row. If you call
Use the
Bookmarks in a document can overlap and span any range. To create a valid bookmark you need to
call both
Badly formed bookmarks or bookmarks with duplicate names will be ignored when the document is saved.
Bookmarks in a document can overlap and span any range. To create a valid bookmark you need to
call both
Badly formed bookmarks or bookmarks with duplicate names will be ignored when the document is saved.
Use Font to access and modify font formatting properties.
Specify font formatting before inserting text.
CurrentNode is a cursor of DocumentBuilder and points to a Node that is a direct child of a Paragraph. Any insert operations you perform using DocumentBuilder will insert before the CurrentNode.
When the current paragraph is empty or the cursor is positioned just before the end of the paragraph, CurrentNode returns null.
Aspose.Words automatically generates a unique file name for every embedded image when exporting to HTML format. How the image file name is generated depends on whether you save the document to a file or to a stream.
When saving a document to a file, the generated image file name looks like <document base file name>.<image number>.<extension>.
When saving a document to a stream, the generated image file name looks like Aspose.Words.<document guid>.<image number>.<extension>.
If the extension cannot be recognized, returns
The Aspose.Words.Fields namespace contains classes that represent Microsoft Word fields in a document.
Variable names and values are strings.
Variable names are case-insensitive.
Although Aspose.Words is able to read and write this option, its usage is application-specific. For example MS Word 2013 does not respect the value of this option.
If value is 0 then this property uses 100 instead, else if value is less than 10 or greater than 500 this property throws.
Although Aspose.Words is able to read and write this option, its usage is application-specific. For example MS Word 2013 does not respect the value of this option.
Currently works only for documents in WordML format.
Use the
Although the
The default value is
The default value is 1.
The default value is true.
The default value is null.
A
Each
This is an abstract class. The two derived classes that you can instantiate
are
A shape is a node in the document tree.
If the shape is a child of a
A shape can also occur as a child of a
A shape can be positioned inline with text or floating. The positioning method is controlled
using the
When a shape is floating, it is positioned relative to something (e.g the current paragraph,
the margin or the page). The relative positioning of the shape is specified using the
A floating shape be positioned explicitly using the
The default value is an empty string.
The default value is an empty string.
Below are examples of valid values for this property:
Full URI:
Full file name:
Relative file name:
Bookmark within another document:
Bookmark within this document:
The default value is an empty string.
The default value is an empty string.
The default value is false.
Has effect only for top level shapes.
This property affects behavior of the shape's anchor in Microsoft Word. When the anchor is not locked, moving the shape in Microsoft Word can move the shape's anchor too.
The default value is true.
Has effect only for top level shapes.
The default value is false.
Has effect only for top level shapes.
For a top-level shape, the value is in points and relative to the shape anchor.
For shapes in a group, the value is in the coordinate space and units of the parent group.
The default value is 0.
Has effect only for floating shapes.
For a top-level shape, the value is in points and relative to the shape anchor.
For shapes in a group, the value is in the coordinate space and units of the parent group.
The default value is 0.
Has effect only for floating shapes.
For a top-level shape, the value is in points and relative to the shape anchor.
For shapes in a group, the value is in the coordinate space and units of the parent group.
For a top-level shape, the value is in points and relative to the shape anchor.
For shapes in a group, the value is in the coordinate space and units of the parent group.
For a top-level shape, the value is in points.
For shapes in a group, the value is in the coordinate space and units of the parent group.
The default value is 0.
For a top-level shape, the value is in points.
For shapes in a group, the value is in the coordinate space and units of the parent group.
The default value is 0.
The default value is 0.
Has effect only for top level shapes.
The default value is 0.
Has effect only for top level shapes.
The default value is 1/8 inch.
Has effect only for top level shapes.
The default value is 1/8 inch.
Has effect only for top level shapes.
The default value is 0.
Has effect only for top level shapes.
The default value is 0.
The number represents the stacking precedence. A shape with a higher number will be displayed as if it were overlapping (in "front" of) a shape with a lower number.
The order of overlapping shapes is independent for shapes in the header and in the main text of the document.
The display order of child shapes in a group shape is determined by their order inside the group shape.
For a top-level shape, the value is in points and relative to the shape anchor.
For shapes in a group, the value is in the coordinate space and units of the parent group.
The default value is
The default value is
Has effect only for top level floating shapes.
The default value is
Has effect only for top level floating shapes.
The default value is
Has effect only for top level floating shapes.
The default value is
Has effect only for top level floating shapes.
The default value is
Has effect only for top level shapes.
The default value is
Has effect only for top level shapes.
The default value is (0,0).
The default value is (1000, 1000).
By default, the shape is floating and has default location and size.
You should specify desired shape properties after you created a shape.
By default, the shape is floating and has default location and size.
You should specify desired shape properties after you created a shape.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
Use the
An image can be stored inside a shape, linked to external file or both (linked and stored in the document).
Regardless of whether the image is stored inside the shape or linked, you can always access the actual
image using the
To store an image inside a shape use the
A new
It is the responsibility of the caller to dispose the image object.
If the image bytes are stored in the shape, creates and returns a
If the image is linked and stored in a file, opens the file and returns a
If the image is linked and stored in an external URL, downloads the file and returns a
Is it the responsibility of the caller to dispose the stream object.
Is it the responsibility of the caller to dispose the stream object.
Returns
If the image is linked only and not stored in the document, returns zero size.
The default value is an empty string.
If
The default value is an empty string.
The amount of cropping can range from -1.0 to 1.0. The default value is 0. Note that a value of 1 will display no picture at all. Negative values will result in the picture being squeezed inward from the edge being cropped (the empty space between the picture and the cropped edge will be filled by the fill color of the shape). Positive values less than 1 will result in the remaining picture being stretched to fit the shape.
The default value is 0.
The amount of cropping can range from -1.0 to 1.0. The default value is 0. Note that a value of 1 will display no picture at all. Negative values will result in the picture being squeezed inward from the edge being cropped (the empty space between the picture and the cropped edge will be filled by the fill color of the shape). Positive values less than 1 will result in the remaining picture being stretched to fit the shape.
The default value is 0.
The amount of cropping can range from -1.0 to 1.0. The default value is 0. Note that a value of 1 will display no picture at all. Negative values will result in the picture being squeezed inward from the edge being cropped (the empty space between the picture and the cropped edge will be filled by the fill color of the shape). Positive values less than 1 will result in the remaining picture being stretched to fit the shape.
The default value is 0.
The amount of cropping can range from -1.0 to 1.0. The default value is 0. Note that a value of 1 will display no picture at all. Negative values will result in the picture being squeezed inward from the edge being cropped (the empty space between the picture and the cropped edge will be filled by the fill color of the shape). Positive values less than 1 will result in the remaining picture being stretched to fit the shape.
The default value is 0.
The default value is 0.
The default value is 0.5.
The default value is 0.5.
The default value is false.
The default value is false.
The Aspose.Words.Drawing namespace contains classes that allow to create and modify drawing objects in Microsoft Word documents.
Aspose.Words supports all drawing objects in Microsoft Word documents, including OfficeArt shapes, textboxes, pictures, diagrams, OLE objects and ActiveX controls.
The main classes in this namespace are:
Although not every type of drawing object can be programmatically created and not every shape property can be accessed, all drawing objects are fully preserved in Microsoft Word documents during document open-save operations.
Names of classes, methods and properties in this namespace correspond to VML DOM where possible.
Use the
It is the responsibility of the caller to dispose the stream.
The default value is an empty string.
The default value is an empty string.
If
The default value is an empty string.
For example, if the source file is a Microsoft Excel workbook, the
The default value is false.
The default value is false.
Using the
An important property of a shape is its
Shapes that can have text, can contain
You should specify desired shape properties after you created a shape.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
This method serves as a copy constructor for nodes. The cloned node has no parent, but belongs to the same document as the original node.
This method always performs a deep copy of the node. The isCloneChildren parameter specifies whether to perform copy all child nodes as well.
This is a shortcut to the
The default value is true.
This is a shortcut to the
The default value is 0.75.
This is a shortcut to the
The default value is
This is a shortcut to the
The default value is true.
This is a shortcut to the
The default value is
The shape is a group shape.
You cannot create shapes of this type in the document.
You cannot create shapes of this type in the document.
You cannot create shapes of this type in the document.
You cannot create shapes of this type in the document.
Use the
The default value is true.
The default value is 0.75.
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is
The default value is 1.
Use the
The default value is 1/10 inch.
The default value is 1/10 inch.
The default value is 1/20 inch.
The default value is 1/20 inch.
The default value is false.
The default value is
The default value is
Use the
The default value is false.
The default value is false.
The default value is false.
The default value is Arial.
The default value is 36.
The default value is false.
The default value is false.
The default value is false.
The default value is false.
The default value is false.
The default value is false.
The default value is false.
The default value is false.
The default value is false.
The default value is false.
The default value is an empty string.
The default value is
The default value is false.
If true, the layout order of rows is reversed. This attribute is used for vertical text layout.
The default value is 1.
The default value is false.
If true, the text runs along a path from left to right along the x value of the lower boundary of the shape.
Specifies the OCX field.
Normally, Aspose.Words will represent an ActiveX control as a
Match.Index" gets the zero-based starting position of the match from the start of the find and replace range.
When group name is null,
Default is null.
Default is zero.
The Footnote class is used to represent both footnotes and endnotes in a Word document.
Footnote is an inline-level node and can only be a child of Paragraph.
Footnote can contain Paragraph and Table child nodes.
InlineStory is a container for block-level nodes
The classes that derive from InlineStory are inline-level nodes that can contain their own text (paragraphs and tables). For example, a Comment node contains text of a comment and a Footnote contains text of a footnote.
When Footnote is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Footnote to the document use InsertAfter or InsertBefore on the paragraph where you want the footnote inserted.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
When you copy nodes from one document to another, this option specifies how formatting is resolved when both documents have a style with the same name, but different formatting.
The formatting is resolved as follows:
When using the UseDestinationStyles option, if a matching style already exists in the destination document, the style is not copied and the imported nodes are updated to reference the existing style.
The drawback of using UseDestinationStyles is that the imported text might look different in the destination document comparing to the source document. For example, the "Heading 1" style in the source document uses Arial 16pt font and the "Heading 1" style in the destination document uses Times New Roman 14pt font. When importing text of "Heading 1" style with no other direct formatting, it will appear as Times New Roman 14pt font in the destination document.
Using the KeepSourceFormatting option allows to make sure the imported text looks in the destination document exactly like it was in the source document. If a matching style already exists in the destination document, the source style is copied and given a unique name by appending a suffix number to it, for example "Normal_0" or "Heading 1_5".
The drawback of using KeepSourceFormatting is that if you perform several imports, you could end up with many styles in the destination document and that could make using consistent style formatting in Microsoft Word difficult for this document.
Using KeepDifferentStyles option allows to reuse destination styles if the formatting they provide is identical to the styles in the source document. If the style in destination document is different from the source then it is imported.
Aspose.Words provides functionality for easy copying and moving fragments between Microsoft Word documents. This is known as "importing nodes". Before you can insert a fragment from one document into another, you need to "import" it. Importing creates a deep clone of the original node, ready to be inserted into the destination document.
The simplest way to import a node is to use the
However, when you need to import nodes from one document to another multiple times,
it is better to use the
Copying or moving fragments from one Microsoft Word document to another presents a number of technical challenges for Aspose.Words. In a Word document, styles and list formatting are stored centrally, separately from the text of the document. The paragraphs and runs of text merely reference the styles by internal unique identifiers.
The challenges arise from the fact that styles and lists are different in different documents. For example, to copy a paragraph formatted with the Heading 1 style from one document to another, a number of things must be taken into account: decide whether to copy the Heading 1 style from the source document to the destination document, clone the paragraph, update the cloned paragraph so it refers to the correct Heading 1 style in the destination document. If the style had to be copied, all the styles that it references (based on style and next paragraph style) should be analyzed and possibly copied too and so on. Similar issues exist when copying bulleted or numbered paragraphs because Microsoft Word stores list definitions separately from text.
The
Imports a node from one document into another.
Importing a node creates a copy of the source node belonging to the importing document. The returned node has no parent. The source node is not altered or removed from the original document.
Before a node from another document can be inserted into this document, it must be imported.
During import, document-specific properties such as references to styles and lists are translated
from the original to the importing document. After the node was imported, it can be inserted
into the appropriate place in the document using
If the source node already belongs to the destination document, then simply a deep clone of the source node is created.
Imports a node from one document into another.
Importing a node creates a copy of the source node belonging to the importing document. The returned node has no parent. The source node is not altered or removed from the original document.
Before a node from another document can be inserted into this document, it must be imported.
During import, document-specific properties such as references to styles and lists are translated
from the original to the importing document. After the node was imported, it can be inserted
into the appropriate place in the document using
If the source node already belongs to the destination document, then simply a deep clone of the source node is created.
A list in a Microsoft Word document is a set of list formatting properties. Each list can have up to 9 levels and formatting properties, such as number style, start value, indent, tab position etc are defined separately for each level.
A
To create a new list, use the Add methods of the
To modify formatting of a list, use
To apply or remove list formatting from a paragraph, use
You do not normally need to use this property. But if you use it, you normally do so
in conjunction with the
A list always has a parent document and is valid only in the context of that document.
The lists that you create with Aspose.Words are always multi-level lists and contain 9 levels.
Microsoft Word 2003 and later always create multi-level lists with 9 levels. But in some documents, created with earlier versions of Microsoft Word you might encounter lists that have 1 level only.
Use this property to access and modify formatting individual to each level of the list.
When this property is true, the
By modifying properties of a list that defines a list style, you modify the properties of the list style.
A list that is a definition of a list style cannot be applied directly to paragraphs to make them numbered.
Note, modifying properties of a list that is a reference to list style has no effect. The list formatting specified in the list style itself always takes precedence.
If this list is not associated with a list style, the property will return null.
A list could be a reference to a list style, in this case
A list could be a definition of a list style, in this case
You do not create objects of this class. List level objects are created automatically
when a list is created. You access
Use the properties of
Default value is 1.
Among normal text characters, the string can contain placeholder characters \x0000 to \x0008 representing the numbers from the corresponding list levels.
For example, the string "\x0000.\x0001)" will generate a list label that looks something like "1.5)". The number "1" is the current number from the 1st list level, the number "5" is the current number from the 2nd list level.
Null is not allowed, but an empty string meaning no number is valid.
The list label is justified relative to the
Has effect only when
This property is null when the list level is not linked to a paragraph style. This property can be set to null.
Used as a value for the
There could be 1 or 9 levels in a list.
A list in a Microsoft Word document is a set of list formatting properties.
The formatting of the lists is stored in the
You do not create objects of this class. There is always only one
To create a new list based on a predefined list template or based on a list style,
use the
To create a new list with formatting identical to an existing list,
use the
To make a paragraph bulleted or numbered, you need to apply list formatting
to a paragraph by assigning a
To remove list formatting from a paragraph, use the
If you know a bit about WordprocessingML, then you might know it defines separate concepts for "list" and "list definition". This exactly corresponds to how list formatting is stored in a Microsoft Word document at the low level. List definition is like a "schema" and list is like an instance of a list definition.
To simplify programming model, Aspose.Words hides the distinction between list and list definition in much the same way like Microsoft Word hides this in its user interface. This allows you to concentrate more on how you want your document to look like, rather than building low-level objects to satisfy requirements of the Microsoft Word file format.
It is not possible to delete lists once they are created in the current version of Aspose.Words. This is similar to Microsoft Word where user does not have explicit control over list definitions.
Aspose.Words list templates correspond to the 21 list templates available in the Bullets and Numbering dialog box in Microsoft Word 2003.
All lists created using this method have 9 list levels.
The newly created list references the list style. If you change the properties of the list style, it is reflected in the properties of the list. Vice versa, if you change the properties of the list, it is reflected in the properties of the list style.
The source list can be from any document. If the source list belongs to a different document, a copy of the list is created and added to the current document.
If the source list is a reference to or a definition of a list style, the newly created list is not related to the original list style.
You don't normally need to use this method. Most of the time you apply list formatting
to paragraphs just by settings the
A list template value is used as a parameter into the
Aspose.Words list templates correspond to the 21 list templates available in the Bullets and Numbering dialog box in Microsoft Word 2003.
Default bulleted list with 9 levels. Bullet of the first level is a disc, bullet of the second level is a circle, bullet of the third level is a square. Then formatting repeats for the remaining levels.
Each level is indented to the right by 0.25" relative to the previous level.
Corresponds to the 1st bulleted list template in the Bullets and Numbering dialog box in Microsoft Word.
Same as BulletDefault.
Corresponds to the 1st bulleted list template in the Bullets and Numbering dialog box in Microsoft Word.
The bullet of the first level is a circle. The remaining levels are same as in BulletDefault.
Corresponds to the 2nd bulleted list template in the Bullets and Numbering dialog box in Microsoft Word.
The bullet of the first level is a square. The remaining levels are same as in BulletDefault.
Corresponds to the 3rd bulleted list template in the Bullets and Numbering dialog box in Microsoft Word.
The bullet of the first level is a 4-diamond Wingding character. The remaining levels are same as in BulletDefault.
Corresponds to the 5th bulleted list template in the Bullets and Numbering dialog box in Microsoft Word.
The bullet of the first level is an arrow head Wingding character. The remaining levels are same as in BulletDefault.
Corresponds to the 6th bulleted list template in the Bullets and Numbering dialog box in Microsoft Word.
The bullet of the first level is a tick Wingding character. The remaining levels are same as in BulletDefault.
Corresponds to the 7th bulleted list template in the Bullets and Numbering dialog box in Microsoft Word.
Default numbered list with 9 levels. Arabic numbering (1., 2., 3., ...) for the first level, lowecase letter numbering (a., b., c., ...) for the second level, lowercase roman numbering (i., ii., iii., ...) for the third level. Then formatting repeats for the remaining levels.
Each level is indented to the right by 0.25" relative to the previous level.
Corresponds to the 1st numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
Same as NumberDefault.
Corresponds to the 1st numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
The number of the first level is "1)". The remaining levels are same as in NumberDefault.
Corresponds to the 2nd numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
The number of the first level is "I.". The remaining levels are same as in NumberDefault.
Corresponds to the 3rd numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
The number of the first level is "A.". The remaining levels are same as in NumberDefault.
Corresponds to the 4th numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
The number of the first level is "a)". The remaining levels are same as in NumberDefault.
Corresponds to the 5th numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
The number of the first level is "a.". The remaining levels are same as in NumberDefault.
Corresponds to the 6th numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
The number of the first level is "i.". The remaining levels are same as in NumberDefault.
Corresponds to the 7th numbered list template in the Bullets and Numbering dialog box in Microsoft Word.
An outline list with levels numbered "1), a), i), (1), (a), (i), 1., a., i.".
Corresponds to the 1st outline list template in the Bullets and Numbering dialog box in Microsoft Word.
An outline list with levels are numbered "1., 1.1., 1.1.1, ...".
Corresponds to the 2nd outline list template in the Bullets and Numbering dialog box in Microsoft Word.
An outline lists with various bullets for different levels.
Corresponds to the 3rd outline list template in the Bullets and Numbering dialog box in Microsoft Word.
An outline list with levels linked to Heading styles.
Corresponds to the 4th outline list template in the Bullets and Numbering dialog box in Microsoft Word.
An outline list with levels linked to Heading styles.
Corresponds to the 5th outline list template in the Bullets and Numbering dialog box in Microsoft Word.
An outline list with levels linked to Heading styles.
Corresponds to the 6th outline list template in the Bullets and Numbering dialog box in Microsoft Word.
An outline list with levels linked to Heading styles.
Corresponds to the 7th outline list template in the Bullets and Numbering dialog box in Microsoft Word.
Used as a value for the
The Aspose.Words.Lists namespace contains classes for working with bulleted and numbered lists defined in a document.
If you are implementing
Aspose.Words uses this name to match against the mail merge region name specified in the template document. The comparison between the data source name and the mail merge region name is not case sensitive.
For mail merge operation to work, the document should contain Word MERGEFIELD and optionally NEXT fields. During mail merge operation, merge fields in the document are replaced with values from your data source.
There are two distinct ways to use mail merge: with mail merge regions and without.
The simplest mail merge is without regions and it is very similar to how mail merge works in Word. Use Execute methods to merge information from some data source such as DataTable, DataSet, DataView, IDataReader or an array of objects into your document. The MailMerge object processes all records of the data source and copies and appends content of the whole document for each record.
Note that when MailMerge object encounters a NEXT field, it selects next record in the data source and continues merging without copying any content.
Use ExecuteWithRegions methods to merge information into a document with mail merge regions defined. You can use DataSet, DataTable, DataView or IDataReader as data sources for this operation.
You need to use mail merge regions if you want to dynamically grow portions inside the document. Without mail merge regions whole document will be repeated for every record of the data source.
Use this method to fill mail merge fields in the document with values from
any data source such as a list or hashtable or objects. You need to write your
own class that implements the
You can use this method only when
This method ignores the
Use this method to fill mail merge fields in the document with values from
any data source such as a list or hashtable or objects. You need to write your
own class that implements the
You should use this method when
This method ignores the
Use this method to fill mail merge fields in the document with values from an array of objects.
This method merges data for one record only. The array of field names and the array of values represent the data of a single record.
This method does not use mail merge regions.
This method ignores the
Use this method to fill mail merge fields in the document with values from a DataTable.
All records from the table are merged into the document.
You can use NEXT field in the Word document to cause MailMerge object to select next record from the DataTable and continue merging. This can be used when creating documents such as mailing labels.
When MailMerge object reaches end of the main document and there are still more rows in the DataTable, it copies entire content of the main document and appends it to the end of the destination document using a section break as a separator.
This method ignores the
This method is useful when you intend to use Aspose.Words classes as COM objects from unmanaged code such as an application built using ASP or Visual Basic 6.0.
This method ignores the
For more information see description of MailMerge.Execute(DataTable).
[VBScript]
Dim RS
Set RS = CreateObject("ADODB.Recordset")
RS.Open _
"SELECT TOP 50 * FROM Customers ORDER BY Country, CompanyName", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Northwind.mdb"
Dim License
Set License = CreateObject("Aspose.Words.License")
License.SetLicense "C:\MyPath\MyLicense.lic"
Dim Helper
Set Helper = CreateObject("Aspose.Words.ComHelper")
Dim Doc
Set Doc = Helper.Open("CustomerLabels.doc")
Doc.MailMerge.ExecuteADO RS
Doc.Save "C:\MyPath\CustomerLabels Out VBScript.doc"
You can pass SqlDataReader or OleDbDataReader object into this method as a parameter because they both implemented IDataReader interface.
Note this method does not use mail merge regions and for multiple records the document will grow by repeating the whole document.
This method ignores the
This method is useful if you retrieve data into a DataTable but then need to apply a filter or sort before the mail merge.
Note this method does not use mail merge regions and for multiple records the document will grow by repeating the whole document.
This method ignores the
Use this method to fill mail merge fields in the document with values from a DataRow.
This method ignores the
Use this method to fill mail merge fields in the document with values from
any custom data source such as an XML file or collections of business objects. You need to write your
own class that implements the
You can use this method only when
Use this method to fill mail merge fields in the document with values from
any custom data source such as an XML file or collections of business objects. You need to write your
own class that implements the
You should use this method when
Use this method to fill mail merge fields in the document with values from
any custom data source such as an XML file or collections of business objects. You need to write your own classes
that implement the
You can use this method only when
Use this method to fill mail merge fields in the document with values from
any custom data source such as an XML file or collections of business objects. You need to write your own classes
that implement the
You should use this method when
Use this method to perform mail merge from one or more tables into repeatable mail merge regions in the document. The mail merge regions inside the document will dynamically grow to accommodate records in the corresponding tables.
Every table in the DataSet must have a name.
The document must have mail merge regions defined with names that refer to the tables in the DataSet.
To specify a mail merge region in the document you need to insert two mail merge fields to mark beginning and end of the mail merge region.
All document content that is included inside a mail merge region will be automatically repeated for every record in the DataTable.
To mark beginning of a mail merge region insert a MERGEFIELD with name TableStart:MyTable, where MyTable corresponds to one of the table names in your DataSet.
To mark the end of the mail merge region insert another MERGEFIELD with name TableEnd:MyTable.
To insert a MERGEFIELD in Word use Insert/Field command and select MergeField then type the name of the field.
The TableStart and TableEnd fields must be inside the same section in your document.
If used inside a table, TableStart and TableEnd must be inside the same row in the table.
Mail merge regions in a document should be well formed (there always needs to be a pair of matching TableStart and TableEnd merge fields with the same table name).
The document must have a mail merge region defined with name that matches DataTable.TableName.
If there are other mail merge regions defined in the document they are left intact. This allows to perform several mail merge operations.
This method is useful when you intend to use Aspose.Words classes as COM objects from unmanaged code such as an application built using ASP or Visual Basic 6.0.
For more information see description of MailMerge.ExecuteWithRegions(DataTable).
[VBScript]
Dim RS
Set RS = CreateObject("ADODB.Recordset")
RS.Open _
"SELECT * FROM AsposeWordOrderDetails WHERE OrderId = 10444 ORDER BY ProductID", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Northwind.mdb"
Dim Helper
Set Helper = CreateObject("Aspose.Words.ComHelper")
Dim Doc
Set Doc = Helper.Open("Invoice.doc")
Doc.MailMerge.ExecuteWithRegionsADO RS, "OrderDetails"
Doc.Save "Invoice Out VBScript.doc"
This method is useful if you retrieve data into a DataTable but then need to apply a filter or sort before the mail merge.
The document must have a mail merge region defined with name that matches DataView.Table.TableName.
If there are other mail merge regions defined in the document they are left intact. This allows to perform several mail merge operations.
You can pass SqlDataReader or OleDbDataReader object into this method as a parameter because they both implemented IDataReader interface.
Returns full merge field names including optional prefix. Does not eliminate duplicate field names.
A new string[] array is created on every call.
Includes "mustache" field names if
This method removes MERGEFIELD and NEXT fields from the document.
This method could be useful if your mail merge operation does not always need to populate all fields in the document. Use this method to remove all remaining mail merge fields.
When true, paragraphs which contain region start and end merge fields which are otherwise empty are also removed.
This property is obsolete. Please use
This property is obsolete. Please use
Normally, mail merge is only performed into MERGEFIELD fields, but several customers had their reporting built using other fields and had many documents created this way. To simplify migration (and because this approach was independently used by several customers) the ability to mail merge into other fields was introduced.
When UseNonMergeFields is set to true, Aspose.Words will perform mail merge into the following fields:
MERGEFIELD FieldName
MACROBUTTON NOMACRO FieldName
IF 0 = 0 "{FieldName}" ""
Also, when UserNonMergeFields is set to true, Aspose.Words will perform mail merge into text tags "{{fieldName}}". These are not fields, but just text tags.
Mapped data fields allow to automatically map between names of fields in your data source and names of mail merge fields in the document.
This is implemented as a collection of string keys into string values. The keys are the names of mail merge fields in the document and the values are the names of fields in your data source.
The MergeField event occurs during mail merge when a simple mail merge field is encountered in the document. You can respond to this event to return text for the mail merge engine to insert into the document.
If you have a mapping from a document field name to a different data source field name, then this is the mapped field name.
If you specified a field name prefix, for example "Image:MyFieldName" in the document, then FieldName returns field name without the prefix, that is "MyFieldName".
If you have a mapping from a document field name to a different data source field name, then this is the original field name as specified in the document.
If you specified a field name prefix, for example "Image:MyFieldName" in the document, then DocumentFieldName returns field name without the prefix, that is "MyFieldName".
When your event handler is called, this property is set to null.
If you leave Text as null, the mail merge engine will insert
If you set Text to any string (including empty), the string will be inserted into the document in place of the merge field.
This event occurs during mail merge when an image mail merge
field is encountered in the document. You can respond to this event to return a
file name, stream, or an
There are three properties available
To insert an image mail merge field into a document in Word, select Insert/Field command, then select MergeField and type Image:MyFieldName.
Aspose.Words closes this stream after it merges the image into the document.
The Aspose.Words.MailMerging namespace contains classes of the "original" mail merge reporting engine.
This reporting engine requires the document to be marked up with Microsoft Word mail merge fields, but supports more functionality than Microsoft Word's mail merge.
The engine allows to quickly and easily populate a report template with data from various sources such as DataTable, DataSet, DataView, IDataReader or an array of values.
The
For the newer and more advanced reporting engine based on the LINQ method syntax see
The Aspose.Words.Markup namespace contains classes that represent customer defined semantics in a document: smart tags, custom XML and structured document tags (content controls).
The complete list of child nodes that can occur inside a smart tag consists of
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
Returns null if a property with the specified name is not found.
Each
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
Converts a boolean property into "Y" or "N". Converts a date property into a short date string. For all other types converts a property using Object.ToString().
Throws an exception if the property type is not
Microsoft Word stores only the date part (no time) for custom date properties.
Throws an exception if the property type is not
Throws an exception if the property type is not
The Aspose.Words.Properties namespace provides classes to work with custom and built-in document properties such as title, keywords, company etc.
Body can contain Paragraph and Table child nodes.
Body is a section-level node and can only be a child of Section. There can only be one Body in a Section.
A minimal valid Body needs to contain at least one Paragraph.
Text of a Word document is said to consist of several stories.
The main text is stored in the main text story represented by
When Body is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Body to a Section use Section.InsertAfter or Section.InsertBefore.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
ParentSection is equivalent to
HeaderFooter can contain Paragraph and Table child nodes.
HeaderFooter is a section-level node and can only be a child of Section.
There can only be one HeaderFooter or each
If Section does not have a HeaderFooter of a specific type or the HeaderFooter has no child nodes, this header/footer is considered linked to the header/footer of the same type of the previous section in Microsoft Word.
When HeaderFooter contains at least one Paragraph, it is no longer considered linked to previous in Microsoft Word.
When HeaderFooter is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append HederFooter to a Section use Section.InsertAfter, Section.InsertBefore, HeadersFooters.Add or HeadersFooters.Insert.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
ParentSection is equivalent to
Default is true.
Note, when your link a header or footer, its contents is cleared.
There can be maximum of one HeaderFooter
of eachHeaderFooter objects can occur in any order in the collection.
If any of the headers or footers do not exist, creates them automatically.
If the header or footer of the specified type does not exist, creates it automatically.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
PageSetup object contains all the page setup attributes of a section (left margin, bottom margin, paper size, and so on) as properties.
When true, the columns in this section are laid out from right to left.
Changing Orientation swaps
Section can have one
A minimal valid section needs to have Body with one Paragraph.
Each section has its own set of properties that specify page size, orientation, margins etc.
You can create a copy of a section using
To add, insert or remove a whole section including section break and section properties use methods of the Sections object.
To copy and insert just content of the section excluding the section break and section properties use AppendContent and PrependContent methods.
When the section is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To include Section into a document use Document.InsertAfter, Document.InsertBefore or Sections.Add and Section.Insert methods.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
Only content of
The nodes are automatically imported if the source section belongs to a different document.
No new section is created in the destination document.
Only content of
The nodes are automatically imported if the source section belongs to a different document.
No new section is created in the destination document.
The text of
The text of all headers and footers is cleared, but
The text of all headers and footers is cleared, but
This makes headers and footers of this section linked to headers and footers of the previous section.
Body contains main text of the section.
Returns null if the section does not have a Body node among its children.
A Microsoft Word document can contain multiple sections. To create a section in a Microsoft Word, select the Insert/Break command and select a break type. The break specifies whether section starts on a new page or on the same page.
Programmatically inserting and removing sections can be used to customize documents produced during mail merge. If a document needs to have different content or parts of the content depending on some criteria, then you can create a "master" document that contains multiple sections and delete some of the sections before or after mail merge.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
TextColumn objects are only used to specify columns with custom width and spacing. If you want
the columns in the document to be of equal width, set TextColumns.
When a new TextColumn is created it has its width and spacing set to zero.
Use
To make all columns equal width and spaced evenly, set
If you have EvenlySpaced set to false, you need to specify width and spacing for each
column individually. Use the indexer to access individual
When using custom column widths, make sure the sum of all column widths and spacings between them equals page width minus left and right page margins.
When
Has effect only when
The names of built-in styles in MS Word are localized for different languages. Using a style identifier you can find the correct style regardless of the document language.
All user defined styles are assigned the StyleIdentifier.User value.
You can create character, paragraph or a list style.
When creating a list style, the style is created with default numbered list formatting (1 \ a \ i).
Throws an exception if a style with this name already exists.
Case sensitive, returns null if the style with the given name is not found.
If this is an English name of a built in style that does not yet exist, automatically creates it.
When accessing a style that does not yet exist, automatically creates it.
Cell can only be a child of a Row.
Cell can contain block-level nodes Paragraph and Table.
A minimal valid cell needs to have at least one Paragraph.
When Cell is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Cell to the document use InsertAfter or InsertBefore on the row where you want the cell inserted.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
Cells can only be merged vertically if their left and right boundaries are identical.
When cells are vertically merged, the display areas of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell and all other vertically merged cells must be empty.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
The Aspose.Words.Tables namespace contains classes that represent tables, rows, cells and their formatting.
Row can only be a child of a Table.
Row can contain one or more Cell nodes.
A minimal valid row needs to have at least one Cell.
When Row is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Row to the document use InsertAfter or InsertBefore on the table where you want the row inserted.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
Returns concatenated text of all child nodes with the end of row character
The returned string includes all control and special characters as described in
When true, the cells in this row are laid out right to left.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
Table is a block-level node and can be a child of classes derived from Story or InlineStory.
Table can contain one or more Row nodes.
A minimal valid table needs to have at least one Row.
When Table is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Table to the document use InsertAfter or InsertBefore on the story where you want the table inserted.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
When
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
When Comment is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Comment to the document use InsertAfter or InsertBefore on the paragraph where you want the comment inserted.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
Nonbreaking Hyphen in Microsoft Word does not correspond to the Unicode character U+2011 non-breaking hyphen but instead represents internal information that tells Microsoft Word to display a hyphen and not to break a line.
Useful info: http://www.cs.tut.fi/~jkorpela/dashes.html#linebreaks.
Optional Hyphen in Microsoft Word does not correspond to the Unicode character U+00AD soft hyphen. Instead, it inserts internal information that tells Word about a possible hyphenation point.
You do not create instances of the
Removes all font formatting specified explicitly on the object from which Font was obtained so the font formatting will be inherited from the appropriate parent.
When getting, returns
When setting, sets
When text has 'automatic color', the actual color of text is calculated automatically so that it is readable against the background color. As you change the background color, the text color will automatically switch to black or white in MS Word to maximize legibility.
A paragraph in a Microsoft Word document can be bulleted or numbered. When a paragraph is bulleted or numbered, it is said that list formatting is applied to the paragraph.
You do not create objects of the
The list formatting itself is stored inside a
The paragraphs do not physically belong to a list. The paragraphs just
reference a particular list object via the
This is a shortcut method that creates a new list using the default bulleted template, applies it to the paragraph and selects the 1st list level.
This is a shortcut method that creates a new list using the default numbered template, applies it to the paragraph and selects the 1st list level.
Calling this method is equivalent to setting the
This method changes the list level and applies formatting properties of the new level.
In Word documents, lists may consist of up to nine levels. List formatting for each level specifies what bullet or number is used, left indent, space between the bullet and text etc.
This method changes the list level and applies formatting properties of the new level.
In Word documents, lists may consist of up to nine levels. List formatting for each level specifies what bullet or number is used, left indent, space between the bullet and text etc.
In Word documents, lists may consist of 1 or 9 levels, numbered 0 to 8.
Has effect only when the
The list that is being assigned to this property must belong to the current document.
The list that is being assigned to this property must not be a list style definition.
Setting this property to null removes bullets and numbering from the paragraph
and sets the list level number to zero. Setting this property to null is equivalent
to calling
The complete list of child nodes that can occur inside a paragraph consists of
A valid paragraph in Microsoft Word always ends with a paragraph break character and a minimal valid paragraph consists just of a paragraph break. The Paragraph class automatically appends the appropriate paragraph break character at the end and this character is not part of the child nodes of the Paragraph, therefore a Paragraph can be empty.
Do not include the end of paragraph
When Paragraph is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Paragraph to the document use InsertAfter or InsertBefore on the story where you want the paragraph inserted.
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
The text of all child nodes is concatenated and the end of paragraph character is appended as follows:
The returned string includes all control and special characters as described in
This setting only takes affect when applied to a paragraph style. If applied to a paragraph directly, it has no effect.
When true, the runs and other inline objects in this paragraph are laid out right to left.
When set to true, overrides the effect of
When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:
When set to true, overrides the effect of
When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:
Has no effect when
Has no effect when
When LineSpacingRule property is set to AtLeast, the line spacing can be greater than or equal to, but never less than the specified LineSpacing value.
When LineSpacingRule property is set to Exactly, the line spacing never changes from the specified LineSpacing value, even if a larger font is used within the paragraph.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
The document is represented by a tree of nodes and the nodes provide operations to work with the tree, but some operations are easier to perform if the document is treated as a contiguous sequence of text.
Range is a "facade" interface that provide methods that treat the document or portions of the document as "flat" text regardless of the fact that the document nodes are stored in a tree-like object model.
Range does not contain any text or nodes, it is merely a view or "window" over a fragment of a document.
An exception is thrown if a captured or replacement string contain one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote.
Replaces the whole match captured by the regular expression.
An exception is thrown if a captured or replacement string contain one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote.
An exception is thrown if a captured or replacement string contain one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote.
This method does not update all field types. For the detailed list of supported field types, see the Programmers Guide.
The returned string includes all control and special characters as described in
All text of the document is stored in runs of text.
Run can only be a child of Paragraph.
When Run is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Run to the document use InsertAfter or InsertBefore on the paragraph where you want the run inserted.
When Run is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Run to the document use InsertAfter or InsertBefore on the paragraph where you want the run inserted.
Calls DocumentVisitor.VisitRun.
For more info see the Visitor design pattern.
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
Normally, a tab stop specifies a position where a tab stop exists. But because
tab stops can be inherited from parent styles, it might be needed for the child object
to define explicitly that there is no tab stop at a given position. To clear
an inherited tab stop at a given position, create a TabStop object and set
For more information see
In Microsoft Word documents, a tab stop can be defined in the properties of a paragraph style or directly in the properties of a paragraph. A style can be based on another style. Therefore, the complete set of tab stops for a given object is a combination of tab stops defined directly on this object and tab stops inherited from the parent styles.
In Aspose.Words, when you obtain a TabStops collection for a paragraph or a style, it contains only the custom tab stops defined directly for this paragraph or style. The collection does not include tab stops defined in the parent styles or default tab stops.
If a tab stop already exists at the specified position, it is replaced.
If a tab stop already exists at the specified position, it is replaced.
Skips tab stops with Alignment set to
Skips tab stops with Alignment set to
Use the
The
[VBScript]
Dim helper
Set helper = CreateObject("Aspose.Words.ComHelper")
Dim doc
Set doc = helper.Open(fileName)
This method is same as calling the
[VBScript]
Dim helper
Set helper = CreateObject("Aspose.Words.ComHelper")
Dim doc
Set doc = helper.Open(fileName)
This method is same as calling the
The default value is
The default value is
Pixel format of the output image may differ from the set value because of work of GDI+.
The default value is 96.
Use this property to get or set the quality of generated images when saving in JPEG format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression.
The default value is 95.
The default value is
The Aspose.Words namespace provides classes for generating, converting, modifying, rendering and printing Microsoft Word documents without utilizing Microsoft Word.
Aspose.Words is written completely in C#, CLS compliant and contains only safe managed code. Microsoft Word is not required in order to use Aspose.Words.
The classes in the Aspose.Words namespace borrow best practices from two well-known frameworks: Microsoft Word Automation and System.Xml. A document in Aspose.Words is represented by a tree of nodes, much like in XML DOM. Where possible, class, method and property names match those found in Microsoft Word Automation.
The main classes in this namespace are: