find and replace a font change

J

juditabjuditab

How do you find a font change? I have records where the first half of
the line is bold and the second is regular font. The last letter of
the bold part would have to be found using a wildcard but the first
character of the regular font is always a space. I would then like to
change the space to a line break. Thanks!
 
D

Doug Robbins - Word MVP

Use

Selection.HomeKey wdStory
Selection.Find.Font.Bold = True
With Selection.Find
Do While .Execute(findText:="", Forward:=True, _
MatchWildcards:=False, MatchCase:=True, Wrap:=wdFindStop) = True
Selection.Collapse wdCollapseEnd
Selection.InsertAfter vbCr
Loop
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

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