Such a watermark corresponds to a WordArt object.
Such a watermark corresponds to a shape with image.
Valid values range from 0 to 65.5 inclusive.
Auto scale means that the watermark will be scaled to its max width and max height relative to the page margins.
Valid values range from 0 to 65.5 inclusive.
Auto font size means that the watermark will be scaled to its max width and max height relative to the page margins.
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.
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.
[C#]
Metered matered = new Metered();
matered.SetMeteredKey("PublicKey", "PrivateKey");
[Visual Basic]
Dim matered As Metered = New Metered
matered.SetMeteredKey("PublicKey", "PrivateKey")
CertificateHolder can be created by static factory methods only.
It contains an instance of X509Certificate2 which is used to introduce private, public keys and certificate chains into the system.
This class is applied in
This object is always created. If a paragraph is a frame, then all properties will contain respective values, otherwise all properties are set to their defaults.
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.
Document should be either
Output will be written to the start of stream and stream size will be updated with content length.
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.
Document should be either
Output will be written to the start of stream and stream size will be updated with content length.
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.
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 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.
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.
Calls DocumentVisitor.VisitAbsolutePositionTab.
For more info see the Visitor design pattern.
A document is represented as a tree of nodes, similar to DOM or XmlDocument.
For more info see the Composite design pattern.
The
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.
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.
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.
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.
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.
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.
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.
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
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.
Use the
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.
If desired position is not at inline level, moves to the next paragraph.
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.
When node is a block-level node but not a Paragraph, the cursor is moved to the end of the first paragraph into block-level node 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.
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 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.
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.
Editable range in a document can overlap and span any range. To create a valid editable range you need to
call both
Badly formed editable range will be ignored when the document is saved.
Editable range in a document can overlap and span any range. To create a valid editable range you need to
call both
Badly formed editable range will be ignored when the document is saved.
Use this overload during creating nested editable ranges.
Editable range in a document can overlap and span any range. To create a valid editable range you need to
call both
Badly formed editable range 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.
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
If the extension cannot be recognized, returns
Variable names and values are strings.
Variable names are case-insensitive.
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.
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.
KeepSourceFormatting option allows to make sure the imported content looks the same in the destination document like it looks in the source document. If a matching style already exists in the destination document, the source style formatting is expanded into direct Node attributes and the style is changed to Normal. If the style does not exist in the destination document, then the source style is imported into the destination document and applied to the imported node. Note, that it is not always possible to preserve the source style even if it does not exist in the destination document. In this case formating of such style will be expanded into direct Node attributes in favor of preserving original Node formatting.
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.
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.
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 HeaderFooter 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.
Text of a Word document is said to consist of several stories.
The main text is stored in the main text story represented by
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
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 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.
Note that document-wide defaults were introduced in Microsoft Word 2007 and are fully supported in OOXML formats (
Note that document-wide defaults were introduced in Microsoft Word 2007 and are fully supported in OOXML formats (
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.
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 class derived from Inline can be a child of Paragraph.
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.
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.
Use positive values to set the first-line indent, and negative values to set the hanging indent.
Use positive values to set the first-line indent, and negative values to set the hanging indent.
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
Valid values range from 0 to 1584 inclusive.
Has no effect when
Valid values range from 0 to 1584 inclusive.
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.
Used case-insensitive comparison.
Replaces the whole match captured by the regular expression.
Method is able to process breaks in both pattern and replacement strings.
You should use special meta-characters if you need to work with breaks:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Numbers 1, 2, 3");
// Inserts paragraph break after Numbers.
doc.Range.Replace("Numbers", "Numbers&p", new FindReplaceOptions());
Replaces the whole match captured by the regular expression.
Method is able to process breaks in both pattern and replacement strings.
You should use special meta-characters if you need to work with breaks:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("a1, b2, c3");
// Replaces each number with paragraph break.
doc.Range.Replace(new Regex(@"\d+"), "&p");
Replaces the whole match captured by the regular expression.
Method is able to process breaks in both pattern and replacement strings.
You should use special meta-characters if you need to work with breaks:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Numbers 1, 2, 3");
// Inserts paragraph break after Numbers.
doc.Range.Replace("Numbers", "Numbers&p", new FindReplaceOptions());
Replaces the whole match captured by the regular expression.
Method is able to process breaks in both pattern and replacement strings.
You should use special meta-characters if you need to work with breaks:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("a1, b2, c3");
// Replaces each number with paragraph break.
doc.Range.Replace(new Regex(@"\d+"), "&p", new FindReplaceOptions());
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 or inline StructuredDocumentTag.
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.
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.
Calls DocumentVisitor.VisitSpecialChar.
For more info see the Visitor design pattern.
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 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:
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
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 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.
The Aspose.Words.Properties namespace provides classes to work with custom and built-in document properties such as title, keywords, company etc.
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.
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.
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.
If value of this property is set to 0, any number of consecutive lines can end with hyphens.
The property does not have effect when saving to fixed page formats e.g. PDF.
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.
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.
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
Returns full merge field names including optional prefix. Does not eliminate duplicate field names.
If document contains multiple regions with the same name the very first region is processed.
A new string array is created on every call.
Returns full merge field names including optional prefix. Does not eliminate duplicate field names.
If document contains multiple regions with the same name the Nth region (zero-based) is processed.
A new string array is created on every call.
Hierarchy is returned in the form of the
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.
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.
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.
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".
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.
When this property is specified, the mail merge engine ignores all other properties like
Use this property to fully control the process of merging an image merge field.
For example, you can specify
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.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.
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
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.
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
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.
Table cells can be horizontally merged either using merge flags
When table cell is merged by width property
Use this method to transforms table cells horizontally merged by width to cells merged by merge flags.
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.
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.
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 default value is
Use this property to get or set the quality of the images inside a document when saving in fixed page 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 aims to output XHTML according to the XHTML 1.0 Transitional standard, 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.
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
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
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
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
The default value is false.
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>.
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.
<?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">
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.
The default value is 100.
Set to true to make HTML, MHTML, EPUB, WordML, RTF, DOCX and ODT output human readable. Useful for testing or debugging.
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
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>.
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.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.
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.
This option is supported only in RTF, DOC and DOCX document formats.
This option will be written to DOCX only if
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.
The Aspose.Words.Fonts namespace provides classes and enumerations to access information about fonts used in a document.
The Aspose.Words.Replacing namespace provides classes to manipulate with find/replace operations over the document tree.
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.
An instance of this collection iterates fields which start fall within the specified range.
The
The
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.
Currently this property only affects value of the DOCPROPERTY field.
The default value is null. When this property is set to null, the DOCPROPERTY field's value is preprocessed
with the culture controlled by the
This property is used by the FILENAME field with higher priority than the
This property is used by the AUTOTEXT and GLOSSARY fields, if referenced auto text entry is not found in the
By defalut MS Word stores built-in templates in c:\Users\<username>\AppData\Roaming\Microsoft\Document Building Blocks\1033\16\Built-In Building Blocks.dotx and C:\Users\<username>\AppData\Roaming\Microsoft\Templates\Normal.dotm files.
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.
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.
Microsoft Word allows strings with at most 138 characters.
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.
Microsoft Word allows strings with at most 255 characters.
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 entry macro runs when the form field gets the focus in Microsoft Word.
Microsoft Word allows strings with at most 32 characters.
The exit macro runs when the form field loses the focus in Microsoft Word.
Microsoft Word allows strings with at most 32 characters.
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 strings with at most 64 characters.
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.
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.
The Aspose.Words.Fields namespace contains classes that represent Microsoft Word fields in a document.
Specifies the OCX field.
Normally, Aspose.Words will represent an ActiveX control as a
Valid values range from 1 to 100 inclusive.
The default value is 100.
This is a shortcut to the
Valid values range from 0 to 1584 inclusive.
The default value is 1.5.
The default value is false.
This is a shortcut to the
The default value is
The default value is
This identifier can be associated with a digital signature, when signing document using
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
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.
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
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 depends on the
Has effect for top level shapes only.
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).
The default value is true.
Has effect only for top level shapes, the property
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
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.
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.
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.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.