PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV 24 feature!
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 all the instances of a character string and replaces them with another string in a Document variable.
Example
MyDocument is Document
 
// Replace all "%CustomerName%" by the customer name
MyDocument.Replace("%CustomerLastName%", Customer.LastName)
MyDocument is Document
 
// Replace "Presentation" by "PRESENTATION"
MyDocument.Replace("Presentation", "PRESENTATION", WholeWord)
Syntax
<Document>.Replace(<Text to replace> , <Replacement text> [, <Options>])
<Document>: Document variable
Name of the Document variable to use.
<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.
Component : wd240mdl.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment