Sub FormatColonParagraphs()

Dim para As Paragraph

'Loop through all paragraphs in the active document
For Each para In ActiveDocument.Paragraphs
    
    'Check if paragraph contains a colon
    If InStr(para.Range.Text, ":") > 0 Then
        
        'Set paragraph format
        With para.Range.ParagraphFormat
            .Alignment = wdAlignParagraphJustify
            .OutlineLevel = wdOutlineLevelBodyText
            .LeftIndent = 0
            .RightIndent = 0
            .FirstLineIndent = -4
        End With
        
    End If
    
Next para

End Sub


原文地址: https://www.cveoy.top/t/topic/rTo 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录