Sub TextFonts()
Replace all fonts with destination font
Đổi tất cả các fonts VNI trong slide thành fonts VNI khác có sẵn trên máy tính của bạn
The code below will change the text in most or all of the PowerPoint shapes in your presentation (though it won't affect text in charts, inserted objects and some other PPT bits and pieces).
Sub ReplaceFont()
Dim oSl As Slide
Dim oSh As Shape
Dim sFontName As String
' Chang to the VNI font you have on your Computer, or search online for any VNI fonts:
sFontName = "VNI-Helve-Condense"
With ActivePresentation
For Each oSl In .Slides
For Each oSh In oSl.Shapes
With oSh
If .HasTextFrame Then
'If font start with VNI then replace with the VNI font you have on your computer (sFontName)
If .TextFrame.HasText And InStr(1, .TextFrame.TextRange.Font.Name, "VNI") = 1 Then
'Debug.Print (.TextFrame.TextRange.Font.Name)
.TextFrame.TextRange.Font.Name = sFontName
End If
End If
End With
Next
Next
End With
End Sub