|
|
|
|
|
- Properties specific to Document variables
- WLanguage functions that use Document variables
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."
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
MyDoc is Document = "c:\temp\doc.docx"
FOR EACH para OF MyDoc.Paragraph
FOR EACH MyElement OF para.Element
Trace(MyElement.Texte)
END
END
Propiedades Properties specific to Document variables The following properties can be used to define the characteristics of Document variables: | | | 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 variable of type Document variable to another, this property is not copied (except when calling the DocOpen function).
- If the document comes from a buffer, this property is set 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 or Secret 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.
Novedad versión 2025Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string". Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas. | 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). |
Observaciones WLanguage functions that use Document variables Variables of type Document type variables can be manipulated using the following WLanguage functions: - standard syntax:
| | DocAdd | Adds: - at the end of a word processing document: an element, document, paragraph, text, image or fragment.
- at the end of a fragment: an element, text or image.
| DocClose | Cierra un archivo docx y libera el documento. | DocEndModification | Signals the end of the grouping of a set of operations into a single event (undo/redo management). | 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 | Restaura la última acción deshecha en un documento de tratamiento de textos. | DocRedoCount | Devuelve el número de acciones canceladas que se pueden rehacer en un documento de tratamiento de textos. | 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 the grouping of a set of operations on a document into a single event (undo/redo management). | DocToHTML | Converts a Word Processing document into an HTML file. | DocToImage | Exporta una página encontrada en un documento de tratamiento de texto en formato de imagen. | DocToPDF | Convierte un documento Procesador de texto en un archivo PDF. | DocToText | Crea una cadena de caracteres a partir de los datos: - que se encuentra en un control Procesador de texto o en un documento de Procesador de texto.
- que se encuentra en un párrafo de un control Procesador de texto.
| DocUndo | Deshace la última acción realizada en un documento de tratamiento de textos. | DocUndoCount | Devuelve el número de acciones que se pueden deshacer en un documento. | DocUndoRedoDeleteAll | Elimina todo el historial del mecanismo Deshacer/Rehacer de un documento de tratamiento de texto. | iPrintDoc | Prints a document in "docx" format. |
- prefix syntax:
| | <Document variable>.add | Añade un elemento, documento, párrafo, texto, imagen o fragmento al final de una variable Documento. | <Document variable>.EndModification | Indica el final de una serie de acciones realizadas en una variable de tipo Document en un solo evento (deshacer/rehacer). | <Document variable>.Insert | Inserta un objeto en una variable Documento. Los objetos que se pueden utilizar son: - un elemento,
- un documento,
- a paragraph,
- un texto,
- una imagen, etc,
- un fragmento.
| <Document variable>.InsertTable | Inserta una tabla en una variable de Documento. | <Document variable>.Print | Imprime el contenido de un Documento en formato "docx".. | <Document variable>.Replace | Busca todas las instancias de una cadena de caracteres y las sustituye por otra cadena en una variable Documento. | <Document variable>.Seek | Busca una cadena de caracteres en una variable Documento entera. | <Document variable>.StartModification | Indica el inicio de una serie de acciones realizadas en una variable de tipo Document en un solo evento ("rehacer/deshacer"). | <Document variable>.ToHTML | Convierte una variable Document en un archivo HTML.e | <Document variable>.ToImage | Exporta una página contenida en una variable Documento en formato de imagen. | <Document variable>.ToText | Crea una cadena de caracteres con los datos de una variable Documento. | <Document variable>.UndoCount | Devuelve el número de acciones que se pueden deshacer en una variable Documento. | <Document variable>.UndoRedoDeleteAll | Elimina todo el historial del mecanismo Deshacer/Rehacer de un documento de tratamiento de texto. | <Document variable>Cerrar | Cierra el archivo docx asociado a la variable Documento y libera el documento.. | <Document variable>Deshacer | Deshace la última acción realizada sobre una variable Documento. | <Document variable>Guardar | Guarda un documento como archivo "docx". | <Document variable>Rehacer | Restaura la última acción cancelada sobre una variable Documento. |
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|