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