+ Reply to Thread
Results 1 to 3 of 3

Find & replace text in a table nested within a header for a batch of word files

  1. #1
    Registered User
    Join Date
    11-29-2010
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    87

    Find & replace text in a table nested within a header for a batch of word files

    Hi Forum,

    I'm attempting to get a code together that will take care of the following:

    1. Go and look for all files in a specific folder c:\Test\
    2. Ask the user to enter the text they want to replace (strFindText). Cancel when nothing is entered
    3. Ask the user to enter the text they want to replace it with (strReplaceTxt). Try again when nothing is entered
    4. Open the first file in the folder, look in a table which is in the header for "strFindTxt" and replace that with "strReplaceTxt". Text will be in column 3, 1st row of the table.
    5. Save the first file, open the second and continue to do this until all the files have been handled.

    Can anyone please help me out with this project?

    Kind regards,
    Tino XXL

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Find & replace text in a table nested within a header for a batch of word files

    Try:
    Please Login or Register  to view this content.
    Last edited by macropod; 09-28-2014 at 12:11 AM. Reason: Code correction
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    11-29-2010
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    87

    Re: Find & replace text in a table nested within a header for a batch of word files

    Hi Paul,

    Thank you very much for your feedback, this works like a charm. Now I'm gonna tweek it a little more to our own needs.

    Regards,
    Tino XXL

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 29
    Last Post: 05-07-2019, 10:24 PM
  2. Macro to find header information and replace with specific text
    By Nancy Taylor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2013, 04:47 PM
  3. [SOLVED] Batch creating multiple .txt files and with search and replace
    By kevenson in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-28-2012, 12:25 PM
  4. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  5. Excel VBA to find & replace in embedded Word files
    By Noivilbo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-26-2011, 04:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1