View Single Post
  #3  
Old 08-08-2008, 03:17
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
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:
Code:
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,

-Shelby
Reply With Quote