View Single Post
 
Old 02-17-2023, 08:56 AM
TheBigBoss TheBigBoss is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Dec 2016
Posts: 56
TheBigBoss is on a distinguished road
Default Select Lists or List.ListParagraphs of bulleted text

Hello,

I struggle to select the numbered items of a custom list (1., 2., (a), etc.).

The aim here is to select all numbers items and change font to Times New Roman.
.dotm is attached to test

I tried this but it fails
Code:
Public Sub ChineseChar()
    Dim oD As Object, i As Integer, lstp As List
    Set oD = ActiveDocument
    If (Selection.Type <> wdSelectionIP) Then
        Selection.Font.Name = "Times New Roman"
        MsgBox "Times New Roman has been applied to the selected text"
    Else
        oD.Select
        Selection.WholeStory
        Selection.Font.Name = "Times New Roman"
       
        For Each lstp In oD.Lists
            lstp.Range.Font.Name = "Times New Roman"
        Next lstp
    End If
    Exit Sub
End Sub
Attached Files
File Type: dotm CHINESE.dotm (27.0 KB, 2 views)
Reply With Quote