Word, F&R: format ((any character string)) as hidden

P

PeterB

MS Word: Find and Replace

What sequence of operators is used to find any string (character and/or
numeral) in double brackets and to mark this as hidden text, including the
double brackets.

Thanks
 
H

Helmut Weber

Hi Peter,

Sub Testjji()
Dim rTmp As Range
Set rTmp = ActiveDocument.Range
With rTmp.Find
.Text = "\[\[(*)\]\]"
.Replacement.Text = "[[\1]]"
.MatchWildcards = True
.Replacement.Font.Hidden = True
.Execute Replace:=wdReplaceAll
End With
End Sub
 
P

PeterB

PeterB said:
MS Word: Find and Replace

What sequence of operators is used to find any string (character and/or
numeral) in double brackets and to mark this as hidden text, including the
double brackets.

Thanks

Servus and thank you Helmut
I should have posted that I am using Word 2003. So I just paste this in as a
new macro ??

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top