![]() |
|
#7
|
|||
|
|||
|
You kind of have your answer already in this thread
Code:
Sub ScratchMacro()
'A basic Word Macro coded by Gregory K. Maxey
Dim oPar As Paragraph
Dim oRng As Range
With ActiveDocument
Set oRng = .Range
oRng.Start = .Paragraphs(3).Range.Start
End With
'Format unnumbered subtitles
For Each oPar In oRng.Paragraphs
If oPar.Range.ComputeStatistics(wdStatisticLines) = 1 _
And oPar.Range.ParagraphFormat.Alignment = wdAlignParagraphLeft _
And Not oPar.Range Like "*[0-9]*" Then
oPar.Range.Style = "Body Text"
End If
Next oPar
lbl_Exit: Set oPar = Nothing
Exit Sub
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Assign different heading styles for different paragraphs
|
Thorin23 | Word VBA | 3 | 05-02-2021 06:22 AM |
| Formatting all paragraphs based on pre defined styles | afif | Word VBA | 0 | 07-26-2019 06:18 AM |
Make paragraphs appear according to specific combination
|
razdul | Word VBA | 2 | 04-17-2019 06:17 AM |
| Trouble Formatting Specific Paragraphs - Bullets, Spacing, Centering, etc | adzialo | Word | 2 | 05-01-2017 12:53 PM |
Selection of all Text for a specific page in word is spanning selection across pages
|
ramsgarla | Word VBA | 9 | 12-05-2012 03:23 AM |