Maybe code below can help Sub ReplaceText() Dim txtFIND As String Dim txtREPLACE As String 'The new word to replace the old Dim p As Page If ActiveShape.Type <> cdrTextShape Then ActiveDocument.AddPages (1): Exit Sub txtFIND = ActiveShape.Text.Selection txtREPLACE = InputBox("New text", "Enter text", "") For Each p In ActiveDocument.Pages p.TextReplace txtFIND, txtREPLACE, True, False Next p End Sub
↧