|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
我就用你提供会附件,修改了内置多级列表链接标题的样式,并运用了样式,请测试》》》》》》》
Sub shishi()
Dim p As Range, doc As Document
Set doc = ActiveDocument
sr$ = "〇一二三四五六七八九十百千万亿"
r1$ = "^13[" & sr & "]@、": r2$ = "^13[((][" & sr & "]@[))]"
r3$ = "^13[0-9]@[、..]": r4$ = "^13[((][0-9]@[))]"
With doc.Content.Find
.Execute "^11", , , 1, , , , , , "^p", 2
.Execute "^p^w", , , 0, , , , , , "^p", 2
.Execute r1, , , 1, , , , , , "^p", 2
.Execute r2, , , 1, , , , , , "^p", 2
.Execute r3, , , 1, , , , , , "^p", 2
.Execute r4, , , 1, , , , , , "^p", 2
End With
doc.Content.InsertAfter Chr(13)
Set p = doc.Range(doc.Content.End - 1, doc.Content.End - 1)
With ListGalleries(3).ListTemplates(1).ListLevels(2)
.NumberFormat = "%2、": .TrailingCharacter = 2
.NumberStyle = 37: .ResetOnHigher = True: .StartAt = 1
.LinkedStyle = "标题 2"
End With
With ListGalleries(3).ListTemplates(1).ListLevels(3)
.NumberFormat = "(%3)": .TrailingCharacter = 2
.NumberStyle = 37: .ResetOnHigher = True: .StartAt = 1
.LinkedStyle = "标题 3"
End With
With ListGalleries(3).ListTemplates(1).ListLevels(4)
.NumberFormat = "%4.": .TrailingCharacter = 2
.NumberStyle = 0: .ResetOnHigher = True: .StartAt = 1
.LinkedStyle = "标题 4"
End With
With ListGalleries(3).ListTemplates(1).ListLevels(5)
.NumberFormat = "(%5)": .TrailingCharacter = 2
.NumberStyle = 0: .ResetOnHigher = True: .StartAt = 1
.LinkedStyle = "标题 5"
End With
p.ListFormat.ApplyListTemplateWithLevel ListGalleries(3).ListTemplates(1)
p.Delete
End Sub |
评分
-
1
查看全部评分
-
|