Hi, a following macro add desired words before and after part of paragraph when it contains bold formating, the problem is that it add that words even if paragraph is empty or it is one accidental sign. Could You help me with that?
Sub add_bold()
Dim x As Long, i As Long, ArrFnd()
ArrFnd = Array("")
For x = 0 To UBound(ArrFnd)
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Font.bold = True
.Font.Color = RGB(33, 33, 32)
.ParagraphFormat.Alignment = wdAlignParagraphJustify
.Execute
End With
Do While .Find.Found
.InsertAfter "{/body:bold}"
.InsertBefore "{body:bold}"
.End = .End
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Next
End Sub