Finds the first occurrence of a string within a specified string and replaces it with another.
Syntax
object.FindReplaceInString pbstrTargetString, lStartChar, bstrFindString, bstrReplacementString, lFlags, plFirstChar, plCharCount, pbstrResultString, pbSuccess
Properties
The FindReplaceInString method syntax has these parts:
Part |
Description |
object |
An object expression that evaluates to an object in the Applies To list. |
pbstrTargetString |
String. The name of the event. |
lStartChar |
String. The code to be written to the event in the form of strings. |
bstrFindString |
|
bstrReplacementString |
String. The string to be substituted for the first occurrence of the find string. |
lFlags |
Long. Search modifiers. Valid entries:
|
plFirstChar |
Long. Returns a one-based index of the first character in the target string which was involved in the match with the find string. |
plCharCount |
Long. Returns the number of characters in the target string which were involved in the match of the find string. |
pbstrResultString |
String. Returns the new string with the specified replacement. |
pbSuccess |
Boolean. Returns True if the operation succeeded, False otherwise. |