FindReplace.Execute Method (Publisher)

Performs the specified Find or Replace operation.

Syntax

expression. Execute

expression A variable that represents a FindReplace object.

Return value

Boolean

Example

This example executes a Find and Replace operation on the active document.

Sub ExecuteFindReplace() 
 Dim objFindReplace As FindReplace 
 Set objFindReplace = ActiveDocument.Find 
 With objFindReplace 
 .Clear 
 .FindText = "library" 
 .Execute 
 End With 
End Sub