View Single Post
 
Old 04-07-2025, 12:46 PM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

Hi! Please, try this simple code:
Code:
Sub Format_If()
'Format as needed all paras that are preceded by an empty para and start with Mon, Tue, Wed, Thu, Fri, Sat, Sun plus space.
Dim myRng As range
    Application.ScreenUpdating = False
    Set myRng = ActiveDocument.range
    With myRng.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .text = "^13^13[FMSTW][aehoru][deintu] "
        .Replacement.text = ""
        .Forward = True
        .Wrap = wdFindStop
        .MatchWildcards = True
        Do While .Execute
            myRng.start = myRng.start + 2
            myRng.Paragraphs(1).range.Font.Bold = True
            myRng.Paragraphs(1).range.Font.Size = 14
            myRng.Collapse wdCollapseEnd
        Loop
    End With
    Application.ScreenUpdating = False
    Set myRng = Nothing
End Sub
Reply With Quote