![]() |
|
#2
|
|||
|
|||
|
Hi, Shelley Lou!
I would use a different approach: Code:
Sub FormatManualNumbering()
Dim rng As range
Dim rngEnd As Long
Application.ScreenUpdating = False
Set rng = ActiveDocument.range
rngEnd = rng.End
rng.Characters.First.InsertBefore Chr(13)
Do
With rng.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchWildcards = True
.text = "^13*^t"
If .Execute And rng.End <= rngEnd Then
.text = "[,:; ]"
.Replacement.text = "."
.Execute Replace:=wdReplaceAll
Else: Exit Do
End If
If rng.Characters.Last.Previous <> "." Then
rng.Characters.Last.InsertBefore "."
End If
rng.Collapse wdCollapseEnd
End With
Loop
ActiveDocument.range.Characters.First.Delete
Application.ScreenUpdating = True
Set rng = Nothing
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
VBA insert period after manual numbering
|
Shelley Lou | Word VBA | 1 | 03-05-2023 03:45 AM |
VBA Remove manual numbering after Outline numbering
|
Shelley Lou | Word VBA | 2 | 08-04-2021 12:24 AM |
VBA converting manual numbering to auto numbering
|
Shelley Lou | Word VBA | 8 | 05-28-2021 01:08 AM |
Applying New Multi-Level List to Existing Document with Manual Numbering and Existing Styles
|
stanley | Word | 4 | 12-15-2020 10:59 AM |
| page numbering for manual | Bursal | Word | 1 | 07-29-2018 02:08 PM |