View Single Post
 
Old 06-13-2024, 08:16 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 302
vivka is on a distinguished road
Default

Hi, Shelley Lou! This simple macro seems to do the job:
Code:
Sub Format_Paras_If()
'In active doc's paras that have a tab/colon, bold the strings
'from paras start until the 1st tab/colon excluding list paras.
'Coded by vivka, 12.06.2024

Dim oRng As range
    Application.ScreenUpdating = False
    Set oRng = ActiveDocument.range
    With oRng.Find
        .ClearFormatting
        .Forward = True
        .Wrap = wdFindStop
        .Format = True
        .MatchWildcards = True
        .Replacement.ClearFormatting
        .text = "[^t:]"
        Do While .Execute And oRng.ListFormat.ListType = 0
            oRng.End = oRng.start
            oRng.start = oRng.Paragraphs(1).range.start
            oRng.Font.Bold = True
            oRng.start = oRng.Paragraphs(1).range.End
        Loop
    End With
Application.ScreenUpdating = True
Set oRng = Nothing
End Sub

Last edited by vivka; 06-13-2024 at 10:58 PM.
Reply With Quote