Office 2010/Word macros
I have a word project I need to get started and it involves macros searching a doc and if it meets a criteria, change it to X. For example, we use templates that have hidden text used as instructions and I want a macro to search the doc and remove it. I have a lot of different examples of this - changing blue boiler plate text to black, adding header/footer info or removing header/footer info. So, to get started, can you help me with a macro that searches a doc for hidden text and removes it. Also, any other books or websites that you think would be helpful to me.
The macro I have included below should do the trick for you:
Dim sView As Boolean
sView = ActiveWindow.View.ShowHiddenText
ActiveWindow.View.ShowHiddenText = True
.Text = ""
.Font.Hidden = True
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
ActiveWindow.View.ShowHiddenText = sView
As for reference materials, I would suggest visiting some forums such as ExcelForums (they are not striclty for Excel and have Word threads
as well) and even sticking with the Microsoft Support
/ Community sites
If you need any help, please let me know!