ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds at the end of a Document variable:
  • an element,
  • a document, a paragraph,
  • a text,
  • an image,
  • a fragment.
Example
MonDocument is Document
// Ajoute une image
// Sélection du fichier image 
sFichier is string  
sFichier = fImageSelect(fCurrentDir(), "", "Ajouter une image",
	"JPEG (*.JPG)" + TAB + "*.jpg" + CR + "PNG (*.PNG)" + TAB + "*.png" + CR + 
	"Tous les fichiers (*.*)" + TAB + "*.*")
IF sFichier = "" THEN
	RETURN
END
// Le fichier image est transféré dans une variable de type Image 
img is Image = sFichier
// Ajout de l'image en fin de document 
MonDocument.Add(img)
MonDocument is Document
// Ajoute un saut de page
MonDocument.Add(Charact(12))
Syntax
<Result> = <Document>.Add(<Object to add>)
<Result>: docFragment variable
docFragment variable with the added fragment.
<Document>: Document variable
Name of the Document variable to be used.
<Object to add>: Type of added object
Object to add:
  • Element: Name of the docElement type variable corresponding to the element to be added.
  • Document: Name of the Document variable corresponding to the document to be added.
    Attention: The following elements of the added document are not retained:
    • The default layout of the added document (e.g. margins).
    • The parameters of the main section of the added document (e.g. headers and footers).
  • Paragraph: Name of the docParagraph variable corresponding to the paragraph to be added. This paragraph must have been retrieved from a document, it cannot be created from nothing because the array of paragraph elements is read-only.
  • String text: Text to be added.
    You can use the following constants in the text to add to manage the different possible breaks:
    docColumnBreakAdds a column break in a multicolumn section. If the section is not multicolumn, a page break is added.
    docLineBreakAdds a line break.
    docPageBreakAdds a page break.
    docParagraphBreakAdds a paragraph break.
  • Image: Name of variable of type Image to be added.
  • Fragment: Name of variable of type docFragment to be added.
Component: wd300mdl.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/27/2025

Send a report | Local help