FindReplace Object
Publisher Developer Reference |
Represents the criteria for a find operation. The properties and methods of the FindReplace object correspond to the options in the Find and Replace dialog box.
Remarks
When the ReplaceScope property is set to pbReplaceScopeOne or pbReplaceScopeAll, the ReplaceWithText property must be set to avoid the text from being replaced with the default value of an empty String for that property.
Example
Use the Find property to return a FindReplace object. The following example selects the next occurrence of the word "factory".
Visual Basic for Applications |
---|
|
Set the ReplaceScope property to determine the extent of the search. The following example replaces the first occurrence of the name "Visual Basic Scripting Edition" with "VBScript".
Visual Basic for Applications |
---|
|
The following example illustrates how the font attributes of the FoundTextRange can be accessed when ReplaceScope is set to pbReplaceScopeNone.
Visual Basic for Applications |
---|
|
See Also