FindReplace.ReplaceScope property (Publisher)
Specifies how many scope replacements are to be made: one, all, or none. Read/write.
Syntax
expression.ReplaceScope
expression A variable that represents a FindReplace object.
Return value
PbReplaceScope
Remarks
The ReplaceScope property value can be one of the PbReplaceScope constants declared in the Microsoft Publisher type library.
The default setting of the ReplaceScope property is pbReplaceScopeNone.
Example
The following example replaces all occurrences of the word "hi" with "hello" in the active document.
With ActiveDocument.Find
.Clear
.FindText = "hi"
.ReplaceWithText = "hello"
.MatchWholeWord = True
.ReplaceScope = pbReplaceScopeAll
.Execute
End With
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.