ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
// Adds an image
// Select the image file
sFile is string  
sFile = fImageSelect(fCurrentDir(), "", "Add an image",
"JPEG (*.JPG)" + TAB + "*.jpg" + CR + "PNG (*.PNG)" + TAB +
"*.png" + CR + "All files (*.*)" + TAB + "*.*")
 
IF sFile = "" THEN
RETURN
END
 
// The image file is transferred into an Image variable
img is Image = sFile
 
// Add the image at the end of document
DocAdd(WP_NoName1, img)
// Add a page break
DocAdd(WP_NoName, Charact(12))
Syntax

Adding at the end of a Word Processing document Hide the details

<Result> = DocAdd(<Document> , <Object to add>)
<Result>: docFragment variable
docFragment variable with the added fragment.
<Document>: Control name or Document variable
Document to use. This document corresponds to :
  • WINDEV the name of a Word Processing control.
  • a variable of type Document.
<Object to add>: Type of added object
Object to add:
  • Element: Name of the docElement variable that corresponds to the element to add.
  • Document: Name of the Document variable that corresponds to the document to add.
  • Paragraph: Name of the docParagraph variable that corresponds to the paragraph to add. This paragraph must have been retrieved from a document, it cannot be created from nothing because the array of paragraph elements is read-only.
  • Text in character string format: Text to add.
    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 Image variable to add.
  • Fragment: Name of docFragment variable to add.

Adding at the end of a fragment Hide the details

<Result> = DocAdd(<Fragment> , <Object to add>)
<Result>: docFragment variable
docFragment variable with the added fragment.
<Fragment>: docFragment variable
Name of the docFragment variable to be used.
<Object to add>: Type of added object
Object to add:
  • Element: Name of the docElement variable that corresponds to the element to add.
  • Text in character string format: Text to add.
    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 Image variable to add.
Component: wd290mdl.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/31/2022

Send a report | Local help