|
|
|
|
|
<Document variable>.Insert (Function) In french: <Variable Document>.Insère Inserts an object in a Document variable. The objects that can be used are: - an element,
- a document,
- a paragraph,
- a text,
- an image,
- a fragment,
- a table of contents.
MonDocument is Document
sFichier is string
sFichier = fImageSelect(fCurrentDir(), "", ...
"Insérer une image","JPEG (*.JPG)" + TAB + "*.jpg" + CR + ...
"PNG (*.PNG)" + TAB + "*.png" + CR + "Tous les fichiers (*.*)" + TAB + "*.*")
IF sFichier = "" THEN
RETURN
END
img is Image
img = sFichier
elt is docElement
elt.Type = typeDocElementImage
elt.Image.ImageBuffer = img
elt.Image.Wrapping = docWrappingAlignedOnText
elt.Image.Width = img.Width * 25.4 / 96.0
elt.Image.Height = img.Height * 25.4 / 96.0
elt.Image.X = 0
elt.Image.Y = 0
MonDocument.Insert(nPositionInsertion, elt)
doc is Document <- TT_MonDocument.Valeur
fragmentSignet is docFragment = doc.Bookmark["Signet 1"]
IF fragmentSignet <> Null THEN
let nPositionInsertion = fragmentSignet.EndPosition
TT_MonDocument.Insère(nPositionInsertion, "Texte à insérer à la position du signet")
ELSE
Error("Signet 'Signet 1' non trouvé dans le document")
END
Syntax
<Result> = <Document>.Insert(<Position> , <Element to insert>)
<Result>: docFragment variable docFragment variable with the inserted fragment. <Document>: Document or String variable Name of the variable of type Document to be used. <Position>: Integer Position where the element will be inserted. This position is expressed in number of characters. <Element to insert>: Type corresponding to the element to insert Element to insert: - Element: Name of the docElement type variable corresponding to the element to be inserted.
- Document: Name of the Document variable corresponding to the document to be inserted.
Caution: The following elements of the inserted document are not retained: - The default layout of the inserted document (e.g. margins).
- The parameters of the main section of the inserted document (e.g. headers and footers).
- Paragraph: Name of the docParagraph variable corresponding to the paragraph to be inserted.
- String text: Text to be inserted.
You can use the following constants in the insertion text to manage the different possible breaks:
| | docColumnBreak | Adds a column break in a multicolumn section. If the section is not multicolumn, a page break is added. | docLineBreak | Adds a line break. | docPageBreak | Adds a page break. | docParagraphBreak | Adds a paragraph break to. |
- Image: Name of the Image variable to be inserted at the specified position.
- Fragment: Name of the docFragment variable to be inserted at the specified position.
Business / UI classification: UI Code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|