ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Looper 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
Creates a Word file (.RTF) using the data from a Looper control.
Remark: This file can be opened in Word or OpenOffice Writer (depending on the software installed on the current computer).
Example
WEBDEV - Server codeAjax
sFic est une chaîne
// Nom du fichier
sFic = ComplèteRep(fRepExe()) + "MonDOCS" + ConnexionOccurrence() + ".doc"
// Si le nom n'a pas été fourni, on abandonne l'export
// Sinon, on exporte le contenu du champ Zone répétée ZR_Client
SI sFic = "" ALORS
ZR_Client.VersWord(sFic)
FIN
Syntax
<Result> = <Looper control>.ToWord(<Doc file name> [, <Options> [, <Start row> [, <End row>]]])
<Result>: Boolean
  • True if the file was created,
  • False otherwise.
<Looper control>: Control name
Name of the Looper control to be used.
<Doc file name>: Character string
Name and full path of the Word file to create. The file is replaced with the new file if it already exists.
<Options>: Optional Integer constant
Configures the Word file to create.
taColumnsTitles
(Default value)
The title of the columns is inserted in the file.
taNoTitleOnly the data is copied to the file.
taSelectedLinesExports the selected rows only (all the rows are exported by default).
<Start row>: Optional integer
Number of the row from which the export will start. If this parameter is not specified, the start row will be the first row found in the Looper control.
<End row>: Optional integer
Number of the row where the export will end. If this parameter is not specified, the end row is the last row found in the Looper control.
Remarks
  • The created file can be opened by Word 95 (or later) or by OpenOffice Writer 2 (or later).
  • This function can be used on Looper controls based on a data file or populated programmatically.
Component: wd290std.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help