|
|
|
|
Encuentra una cadena de caracteres: - en todo un procesador de textos Document.
- en un fragmento.
arrFragments is array of docFragments = DocFind(WP_MyDocument, "%CustomerName%") // Replace all "%CustomerName%" by the customer name FOR EACH f OF arrFragments f.Text = Customer.Name END
// Find "BEAUTIFUL" in the text // Selects the first one found to change its color arrFragments is array of docFragments = DocFind(WP_NoName1, "BEAUTIFUL") IF arrFragments.Count >= 1 THEN // Position the cursor at the beginning of the first word found WP_NoName1.Cursor = arrFragments[1].StartPosition // Calculate the selection length WP_NoName1.SelectionLength = ... arrFragments[1].EndPosition - arrFragments[1].StartPosition+1 // Modify the text color arrFragments[1].Formatting.TextColor = PastelRed BREAK END
Sintaxis
<Result> = DocFind(<Search scope> , <Text to find> [, <Options>])
<Result>: Array de las variables de la docFragment Array de las variables docFragment correspondientes a todos los fragmentos Document en los que se ha encontrado el texto buscado. <Search scope>: Documento Variable, docFragment Variable o control nombre Elemento donde se realizará la búsqueda. Este elemento puede corresponder a: - el nombre de un control Procesador de texto.
- una variable de tipo Document.
- una variable de tipo docFragment.
<Text to find>: Cadena de caracteres Texto que debe encontrarse en el elemento especificado. <Options>: Constante o combinación de constantes opcional Opciones de búsqueda: | | IgnoreCase | Busca sin distinguir entre mayúsculas, minúsculas o acentos. | WholeWord | Busque la palabra completa (encerrada en caracteres de puntuación o en caracteres espaciados). |
De forma predeterminada, la búsqueda distingue entre mayúsculas y minúsculas: el texto buscado y el texto a encontrar deben tener el mismo caso. Para realizar una búsqueda que no distinga entre mayúsculas y minúsculas, utilice la constante IgnoreCase. Clasificación Lógica de negocio / UI: Código UI
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|