|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
可试试如下代码:- Sub test()
- Dim i%, myFormat As ParagraphFormat, oListtemplate As ListTemplate
- With Selection.Range
- If .ListParagraphs.Count = 0 Then MsgBox "选定内容无自动编号段落": Exit Sub
- Set myFormat = .ListParagraphs(1).Range.ParagraphFormat
- Set oListtemplate = .ListParagraphs(1).Range.ListFormat.ListTemplate
- .ListParagraphs(1).Range.ListFormat.ApplyListTemplate oListtemplate, False, 2
- For i = 1 To .ListParagraphs.Count
- .ListParagraphs(i).Range.ParagraphFormat = myFormat
- Next
- End With
- End Sub
复制代码 |
评分
-
2
查看全部评分
-
|