Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Find and Replace in all open Word documents

  • 01-10-2008 11:02AM
    #1
    Registered Users, Registered Users 2 Posts: 7,460 ✭✭✭


    I want to find and replace text in a lot of different Word documents, is there any feature in Microsoft Word to find and replace in all open documents?


Comments

  • Registered Users, Registered Users 2 Posts: 7,460 ✭✭✭fletch


    Did a bit of googling a found a few programmes that will do it....surely there must be a free app/simpler way of doing it??


  • Closed Accounts Posts: 891 ✭✭✭conceited


    autoit


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Any chance of linking that? Or perhaps some capatilisation? Or even explaining what the f*ck you are on about? Not everybody knows what AutoIt is.

    fletch, you could probably write a Visual Basic for Application utility that will do this for you. If I remember correctly the Word Application object has an array of open documents. You could loop through that searching and replacing as you go.


  • Registered Users, Registered Users 2 Posts: 7,460 ✭✭✭fletch


    Evil Phil wrote: »
    Any chance of linking that? Or perhaps some capatilisation? Or even explaining what the f*ck you are on about? Not everybody knows what AutoIt is.
    Well everyone can use google....popped the word AutoIt into google and first link brought me to the correct site
    http://www.autoitscript.com/autoit3/


  • Closed Accounts Posts: 314 ✭✭Gonzales


    Hold down "ctrl" & press "H" this will give you the tool for both find & replace, works a treat.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,475 ✭✭✭MOH


    Gonzales wrote: »
    Hold down "ctrl" & press "H" this will give you the tool for both find & replace, works a treat.

    Not across multiple documents, it doesn't.


  • Closed Accounts Posts: 1,444 ✭✭✭Cantab.


    A very straightforward task.

    If you haven't got Perl already, then go ahead and install Perl. Once installed, open a Windoze command window and type:
    cd PATH/TO/FILES
    

    and
    perl -pi -e 's/STRING/REPLACE/g' *.doc
    

    ,where

    PATH/TO/FILES is the directory containing your MS-Word files (e.g. C:\Documents and Settings\My Documents\Book)
    STRING is the string you wish to replace (e.g. I am gay)
    REPLACE is the new string (e.g. I am not gay)

    Boom, boom, boom.


Advertisement