|
|
|
|
- Properties specific to Document variables
- WLanguage functions that use Document variables
Document (Type of variable) In french: Document
The Document type is used to handle a "docx" document. The content of this document can be viewed and modified by several WLanguage functions and properties. A Document variable can be initialized: with the content of a Word Processing control. - with a ".docx" file or an ".rtf" file.
- with a buffer (containing a docx or rtf).
- with a Binary Memo item of a data file.
- with a character string. For example:
MyDoc is Document = "a paragraph." + CR + "a second paragraph."
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. // Load the document MyDoc is Document = "c:\temp\doc.docx" // Browse the paragraphs of the document FOR EACH para OF MyDoc.Paragraph FOR EACH MyElement OF para.Element Trace(MyElement.Texte) END END
Remarks Properties specific to Document variables The following properties can be used to handle a Document variable: | | | Property name | Type used | Effect |
---|
Bookmark[Bookmark Name] | Associative array of DocFragment variables | Fragment associated with the bookmark. | EvenOddPageDifferent | Boolean | - True if the document must have different headers and footers for the even and odd pages,
- False otherwise. In this case, the headers and footers are identical for the even and odd pages.
| FilePath | Character string | Name and full path of docx file associated with the document. This property is read-only. It is assigned when using DocOpen.
Remarks: - When assigning a Document variable into another one, this property is not copied (except during the call to DocOpen).
- If the document comes from a buffer, this property corresponds to an empty string ("").
| Modified | Boolean | - True if the document was modified since its opening (through programming or by the user),
- False otherwise.
This property is read-only. | Numbering | Array of docNumbering | Numberings associated with the document. The document numberings can be browsed via the FOR EACH statement. | PageColor | Color variable | Background color of the page. | Paragraph | Array of docParagraph | Paragraphs included in the document body. The document paragraphs can be browsed via the FOR EACH statement. | Password | Character string | Password for the docx file. This password is used to encrypt the docx file. This password will be requested when opening the docx file. | Property | docProperty variable | Document properties. | ReadOnly | Boolean | - True if the document is read-only,
- False otherwise.
This property is read-only. | Section | docSection variable | Section information (information global to the document). | Style | Array of docStyle variables | Information about the styles linked to the document (information global to the document). |
WLanguage functions that use Document variables Document variables can be handled using the following WLanguage functions: - standard syntax:
| | DocAdd | Adds: - at the end of a Word Processing document: an element, a document, a paragraph, a text, an image or a fragment.
- at the end of a fragment: an element, a text or an image.
| DocClose | Closes a docx file and frees the document. | DocEndModification | Signals the end of grouping for a set of operations in a single event (management of "undo/redo"). | DocFind | Finds a character string: - in an entire Word Processing document.
- in a fragment.
| DocInsert | Inserts an object into a Word Processing document or replaces the content of the current fragment. The objects that can be used are: - an element,
- a document,
- a paragraph,
- a text,
- an image,
- a fragment.
| DocInsertTable | Inserts a table into a Word Processing document. | DocOpen | Opens a Word Processing file (docx format) in Read/Write mode. The docx file is opened and locked until it is closed. | DocPrint | Prints a document in "docx" format. | DocRedo | Restores the last undone action on a Word Processing document. | DocRedoCount | Returns the number of canceled actions that can be redone on a Word Processing document. | DocReplace | Finds all the instances of a character string and replaces them with another string: - in an entire Word Processing document.
- in a fragment.
| DocSave | Saves a document as a "docx" file. | DocStartModification | Signals the start of grouping for a set of operations on a document in a single event (management of "undo/redo"). | DocToHTML | Converts a Word Processing document into an HTML file. | DocToImage | Exports a page found in a Word Processing document in image format. | DocToPDF | Converts a Word Processing document into a PDF file. | DocToText | Creates a character string from the data: - found in a Word Processing control or in a Word Processing document.
- found in a paragraph of a Word Processing control.
| DocUndo | Undoes the last action performed on a Word Processing document. | DocUndoCount | Returns the number of actions that can be undone on a document. | DocUndoRedoDeleteAll | Deletes the entire history of Undo/Redo mechanism for a Word Processing document. | iPrintDoc | Prints a document in "docx" format. |
- prefix syntax:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|