|
老师:序号调整对我很实用,能麻烦老师在这个代码的基础上增加(1);①;A.;a.这集中切换的类型
Sub 编号1()
'编号1、
Dim r As range, i As Paragraph, s$
s = InputBox("未选则全选!如果未准备好,请按<取消>按钮!", "请输入起始序号(正整数)!", "1")
If s = "" Then Exit Sub
If s <> 0 Then s = s - 1
Set r = IIf(Selection.Type = wdSelectionIP, ActiveDocument.Content, Selection.range)
With r
.Find.Execute "([(0-90-9]@)([、..)])", , , 1, , , , , , "1、", 2 '此处与下面统一修改
For Each i In .Paragraphs
With i.range
If .Text Like "1、*" Then '此处与上面统一修改
s = s + 1
.Characters(1).Text = s
End If
End With
Next
.Select
End With
End Sub |
|