|
|
|
|
<Procesador de texto>.Seek (Función) Encuentra un string en toda una control Procesador de texto. arrFragments is array of docFragments = WP_MyDocument.Find("%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 = WP_NoName1.Find("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> = <Word Processing control>.Search(<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. <Word Processing control>: Nombre del control Nombre del control Procesador de texto a manipular. <Text to find>: Cadena de caracteres Texto que se encuentra en el control. <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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|