Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Finds a character string:
  • in an entire Word Processing document.
  • Versions 24 and later
    in a fragment.
    New in version 24
    in a fragment.
    in a fragment.
Caution: This documentation presents the last features of the Word Processing control. Make sure that all the necessary modules are updated.
tabFragments is array of docFragment = DocSeek(TT_MonDocument, "%NomClient%")
// Remplacement de tous les "%NomClient%" par le nom du client
FOR EACH f OF tabFragments
f.Texte = Client.Nom
// Recherche du mot "BEAUGRAND" dans le texte
// Sélectionne uniquement le premier trouvé pour changer sa couleur
tabFragments is array of docFragment = DocSeek(TT_SansNom1, "BEAUGRAND")
IF tabFragments.Count >= 1 THEN
// Positionnement du curseur au début du premier mot trouvé
TT_SansNom1.Curseur = tabFragments[1].PositionDébut
// Calcul de la longueur de la sélection
TT_SansNom1.LongueurSélection = ...
tabFragments[1].PositionFin - tabFragments[1].PositionDébut+1
// Modification de la couleur du texte
tabFragments[1].MiseEnForme.CouleurTexte = PastelRed
<Result> = DocSeek(<Search scope> , <Text to find> [, <Options>])
<Result>: Array of docFragment variables
Array of docFragment variables corresponding to all the document fragments where the searched text was found.
<Search scope>: Document variable, docFragment variable or control name
Element where the search will be performed. This element can correspond to:
  • WINDEV the name of a Word Processing control.
  • a variable of type Document.
  • Versions 24 and later
    to an variable of type docFragment.
    New in version 24
    to an variable of type docFragment.
    to an variable of type docFragment.
<Text to find>: Character string
Text that must be found in the specified element.
<Options>: Optional constant (or combination of constants)
Search options:
WholeWordSearch for the whole word (enclosed in punctuation characters or in space characters).
IgnoreCaseCase and accent insensitive search (ignores uppercase and lowercase differences).

By default, the search is case-sensitive: the searched text and the text to find must have the same case. To perform a case-insensitive search, use the IgnoreCase constant.
Business / UI classification: UI Code
Component: wd270mdl.dll
Minimum version required
  • Version 22
This page is also available for…
Click [Add] to post a comment