Official Content

Allows replacing all the events of a text with another one.

Syntax

&WordDocument.Replace(OldText, NewText [ , MatchCase [ , MatchWholeWord ] ] )

Type Returned:
Numeric
 
Where:
OldText
   Indicates the text to be replaced.
 
NewText
   Indicates what the next text of the document will be.

MatchCase
   If the value is 1, only the events with equal upper and lowercase configuration will be replaced. If the value is 0 all events are replaced. This parameter is optional and the default behavior is as if the value were 0.

MatchWholeWord
   If the value is 1, only the events that are not part of another word will be replaced. If the value is 0, all events are replaced. This parameter is optional and the default behavior is as if the value were 0.

Note:

This method returns an error code, so it is possible to call it as a function (&Err = &WordDocument.Replace(…..)).

Scope

Extended Data Types: WordDocument
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

See Also

WordDocument Data Type





Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant