+ Reply to Thread
Results 1 to 2 of 2

How to use VBA to replace text within boxes in Word, with text from Excel?

  1. #1
    Registered User
    Join Date
    07-04-2018
    Location
    Southampton, England
    MS-Off Ver
    Office 365 ProPlus (64 bit)
    Posts
    5

    How to use VBA to replace text within boxes in Word, with text from Excel?

    Hello!

    I've managed to work out how to use the replace function to change keywords in Word to whatever I've defined in a list in Excel. However, this does not seem to work when the text I want to replace in Word is in a textbox or shape.

    I basically have a list of keywords in Excel with a list of their replacements in the next column. I want to cycle through each keyword in Excel, find it in Word and replace it with the replacement word listed in Excel. However, my Word document is written entirely in boxes, as it has a particular required layout. I cannot get Excel to replace the text in Word if it's in any kind of box. Can anyone offer any insight?

    Many thanks

  2. #2
    Registered User
    Join Date
    07-04-2018
    Location
    Southampton, England
    MS-Off Ver
    Office 365 ProPlus (64 bit)
    Posts
    5

    Re: How to use VBA to replace text within boxes in Word, with text from Excel?

    As a side note, I would post code but am currently on my phone. I've no issues opening the word document, looping through my list of keywords and setting the replacement. I'm currently using something along the lines of
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    As mentioned, this only replaces text within the document that is not in a textbox or shape. Any help would be greatly appreciated. Do feel free to ask questions if you want any further information!

+ 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: 0
    Last Post: 09-04-2014, 03:32 AM
  2. How can I replace only the words in text boxes in multiple pages in MS word
    By AVIJNANNATH in forum Word Formatting & General
    Replies: 1
    Last Post: 10-31-2012, 03:45 PM
  3. 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
  4. Macro to replace text in Word with text from Excel
    By RemyLabue in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2009, 02:37 PM
  5. Allow Word type formatting in Excel text boxes
    By bsassone in forum Excel General
    Replies: 0
    Last Post: 11-17-2005, 10:30 PM
  6. Find and replace should work in Excel text boxes
    By Bob@Teton in forum Excel General
    Replies: 0
    Last Post: 10-20-2005, 09:05 AM
  7. [SOLVED] How do I copy an Excel chart with added text boxes into Word or P.
    By oleum khaos in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-04-2005, 09:06 AM

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