PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Finds and replaces all the occurrences of a character string by another string in a Word Processing document.
Caution: This documentation presents the last features of the Word Processing control. Make sure that all the necessary modules are updated.
Example
// Replace all "%CustomerName%" by the customer name
DocReplace(WP_MyDocument, "%CustomerLastName%", Customer.LastName)
// Replace "Presentation" by "PRESENTATION"
DocReplace(WP_NoName1, "Presentation", "PRESENTATION", WholeWord)
Syntax
DocReplace(<Document> , <Text to Replace> , <Replacement Text> [, <Options>])
<Document>: Document variable or character string (with or without quotes)
Document to use. This document corresponds to:
  • WINDEV the name of a Word Processing control.
  • a Document variable.
<Text to Replace>: Character string (with quotes)
Text to find and to replace in the document. If this parameter corresponds to an empty string (""), the document will not be modified.
<Replacement Text>: Character string (with quotes)
Character string that will replace <Text to Replace>. If this parameter corresponds to an empty string (""), all the occurrences of <Text to Replace> will be deleted
<Options>: Optional constant (or combination of constants)
Search options for the text to replace:
WholeWordSearch for the whole word (enclosed in punctuation characters or in space characters).
IgnoreCaseSearch while ignoring the case (lowercase/uppercase characters) and the accented characters.
The search is case sensitive by default: the sought text and the text to find must have the same case. To perform a search while ignoring the case, use the IgnoreCase constant.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230mdl.dll
Linux wd230mdl.so
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment