|
|
|
|
|
- Properties specific to docElement variables
- Functions that use docElement variables
docElement (Variable type)
The docElement type handles each element in a docParagraph variable. You can define and change the characteristics of this element using different WLanguage functions and properties. Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
WP_MyDoc = DocOpen(fExeDir() + fSep() + "MyDoc.docx")
fEnd is docFragment(WP_MyDoc, -1)
TextFragment is docFragment(WP_MyDoc, 1, fEnd.EndPosition)
FOR EACH MyCurrentElement OF TextFragment.Element
MyParagraph is docParagraph = MyCurrentElement.Paragraph
Trace(MyParagraph.StartPosition)
Trace(MyParagraph.EndPosition)
END
WP_MyDoc = DocOpen(fExeDir() + fSep() + "MyDoc.docx")
MonDoc is Document = TT_MonDoc
sElement is string
sParagraph is TO string
sValue,sBegin,sEnd,sType are strings
FOR EACH MyPara OF MyDoc.Paragraph
sParagraph = sParagraph + [CR] + sElement
sElement = ""
FOR ALL MyElement OF MyPara.Element
sDebut = MyElement.StartPosition
sFin = MyElement.PositionFin
SWITCH MonElement.Type
CASE typeDocElementFieldSwitch
sType = "Checkbox"
CheckBox is TO docToggleElement <- MyElement..Field
sValue = CheckBox.Checked
END
sElement = sElement + [CR] + sValue + TAB + sBegin + TAB + sEnd + TAB + sType
END
END
Propiedades Properties specific to docElement variables The following properties can be used to define the characteristics of docElement variables: | | | Property name | Type used | Effect |
---|
Cell | docCell variable | Cell characteristics (only if the element corresponds to a table cell). | Champ | | Field characteristics (e.g. Check Box control field). For Check Box control fields, use the elt;- operator to retrieve the switch's characteristics.. Example: CheckBox is TO docToggleElement <- MyElement..Field
| EndPosition | Integer | End position of element in the document. This property is read-only. | Formula | docElementFormula variable | Formula characteristics: formula, formula formatting, formula result (only for formula elements). | Image | docElementImage variable | Image characteristics (can be used for an Image element only). | Link | docElementLink variable | Link characteristics (only if the element corresponds to a link). These characteristics are available in read-only. | Paragraph | docParagraph variable | Paragraph that contains the element. | Parent | docElement variable | Element that contains the element. This property is read-only. | StartPosition | Integer | Start position of element in the document. This property is read-only. | TableOfContents | docTableOfContents variable | Characteristics of the table of contents of the document. | Text | docElementText variable | Text characteristics (can be used for a Text element only). | TextArea | docElementTextArea variable | Characteristics of text area (can be used for a Text Area element only). | Type | Integer | Type of element corresponding to one of the following constants: - typeDocCellElement Cell type element of an array.*=
- typeDocElementSwitchField Check Box control element (check box on a form).
- typeDocDocumentElement Document type element.
- typeDocHeaderElement Page header element.
- typeDocFormulaElement Element of type Formula
- typeDocImageElement Image element.
- typeDocUnrecognizedElement Unrecognized element type.
- typeDocLinkElement Link element.
- typeDocParagraphElement Paragraph element with no text (empty text).
- typeDocFooterElement Footer element.
- typeDocTableOfContents element Table of contents element.
- typeDocTextElement Text element.
- typeDocTextBoxElement Text area element type.
|
Observaciones Functions that use docElement variables | | 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.
| DocChangeZOrder | Changes the Z-order of an Image or Text Area element in a DocX document. | DocDelete | Deletes an element from a document. This element is deleted from its associated document. | 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.
|
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|