View Single Post
Old 08-08-2008, 02:17
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,787
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Even Better....

Even Better try this:
Sub ReplaceTextAcrossOpenDocs()
    Const txtFIND As String = "Yellow" 'The word you want to find and replace
    Const txtREPLACE As String = "Blue" 'The new word to replace the old
    Dim d As Document
    Dim p As Page
    For Each d In Documents 'Loop all the open documents
        For Each p In d.Pages 'Loop each page
           p.TextReplace txtFIND, txtREPLACE, True, False
        Next p
    Next d
End Sub
Best of luck,

Reply With Quote