In order to implement the technique, the initial step is to utilize the multilevel list - heading format, followed by eliminating the numbering through the use of the none style.
Private Sub CommandButton1_Click()
RemoveHiddenBookmarks
End Sub
Sub RemoveHiddenBookmarks()
Dim bm As Bookmark
For Each bm In ActiveDocument.Bookmarks
If bm.Range.Font.Hidden = True Then
bm.Delete
End If
Next bm
End Sub
Private Sub CommandButton2_Click()
ApplyMultiLevelStyle
End Sub
Sub ApplyMultiLevelStyle()
Dim para As Paragraph
For Each para In ActiveDocument.Paragraphs
If para.Style = "Heading 1" Or para.Style = "Heading 2" Or para.Style = "Heading 3" Or para.Style = "Heading 4" Or para.Style = "Heading 5" Or para.Style = "Heading 6" Then
' Set left indent to zero
para.LeftIndent = 0
Select Case para.Style
Case "Heading 1"
para.Style = ActiveDocument.Styles("Heading 1")
Case "Heading 2"
para.Alignment = wdAlignParagraphLeft
para.Style = ActiveDocument.Styles("Heading 2")
Case "Heading 3"
para.Style = ActiveDocument.Styles("Heading 3")
Case "Heading 4"
para.Style = ActiveDocument.Styles("Heading 4")
Case "Heading 5"
para.Style = ActiveDocument.Styles("Heading 5")
Case "Heading 6"
para.Style = ActiveDocument.Styles("Heading 6")
End Select
End If
Next para
End Sub
Ещё видео!