Macro code to highliht shade hidden text

C

Colonel Blip

I have a document that has a lot of hidden text in it. If possible, how
would one code to search for and select the hidden text and shade it?
 
D

Doug Robbins - Word MVP

Hi Colonel Blip,

Use

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Hidden = True
With Selection.Find
Do While .Execute(FindText:="", Format:=True, Wrap:=wdFindStop,
Forward:=True) = True
With Selection.Range.Shading
.Texture = wdTexture12Pt5Percent
.BackgroundPatternColorIndex = wdYellow
.ForegroundPatternColorIndex = wdBlack
End With
Selection.Collapse wdCollapseEnd
Loop
End With


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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