find in excel replace in word: find/replace text in text boxes and headers
I am able to find in excel and replace a variable in word perfectly fine. A new issue i just ran into is when trying to find and replace a variable that is in either a header/footer or a text box (i.e. Title box)
Here is my current code that will not find/replace variables in headers or text boxes in word:
Set wrdDocSelection = wrdApp.Selection
.Text = "[company_name]"
.MatchWholeWord = False
.Replacement.Text = ActiveWorkbook.Sheets("Sheet2").Range("D3")
.Execute , , , , , , , , , , wdReplaceAll
(By the way, if you couldn't tell I'm new to the forums so if anyone could tell me how to insert the window that contains your code that would be greatly appreciated)
Thanks for your help!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1