View Single Post
 
Old 09-18-2024, 05:00 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

Hi! What about this one:
Code:
Function ChangeFont(oDoc As Document) As Boolean

Dim oStory As range
    On Error GoTo err_Handler
    For Each oStory In oDoc.StoryRanges
        If oStory.Font.Name = "Arial" Then
                oStory.Font.Name = "Calibri"
        End If
    Next oStory
    Set oStory = Nothing
lbl_Exit:
    Exit Sub
err_Handler:
    ChangeFont = False
    Resume lbl_Exit
End Function
Reply With Quote