View Single Post
 
Old 12-15-2022, 11:43 PM
balavaka balavaka is offline Windows 10 Office 2013
Novice
 
Join Date: May 2021
Posts: 25
balavaka is on a distinguished road
Default kindly help where i mistake

Code:
Sub RenameCharacterStyles()
    Dim oldNames As Variant
    oldNames = Array("Old Style 1", "Old Style 2", "Old Style 3")

    Dim newNames As Variant
    newNames = Array("New Style 1", "New Style 2", "New Style 3")

    Dim i As Integer
    For i = 0 To UBound(oldNames)
        Dim style As Style
        Set style = ActiveDocument.Styles(oldNames(i))
        style.RenumberList oldNames(i), newNames(i)
    Next i
End Sub
Reply With Quote