View Single Post
 
Old Today, 05:18 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,511
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Code:
Sub FormatAndDelete()
'Format left titles
Application.ScreenUpdating = False
Dim oPar As Paragraph
For Each oPar In ActiveDocument.Paragraphs
  With oPar.Range
    If .Characters.Last.Previous = "." Then .Characters.Last.Previous = vbNullString
    If .ComputeStatistics(wdStatisticLines) = 1 Then
      If .ParagraphFormat.Alignment = wdAlignParagraphLeft Then
         If Not .Text Like "*[0-9]*" Then .Style = "LeftTitle"
      End If
    End If
  End With
Next oPar
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote