View Single Post
 
Old 05-16-2021, 10:05 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This will may get your 'headings' as well if you didn't format them with built-in styles.
Code:
Sub BracketsOnBold()
  With Selection.Find
    .ClearFormatting
    .Font.Bold = True
    .ParagraphFormat.OutlineLevel = wdOutlineLevelBodyText  'this excludes headings
    .Replacement.ClearFormatting
    .Text = ""
    .Replacement.Text = "[^&]"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute Replace:=wdReplaceAll
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote