I have been trying to develop a macro which will replace all fonts in presentation with "Arial". So far I have been successful in replacing fonts for textboxes, tables and SmartArt but couldn't able replace fonts in grouped objects. Below is the code for reference. Can anyone please help?
Sub TextFonts()
Dim oSl As Slide
Dim oSh As Shape
Dim oTbl As Table
Dim oSmt As SmartArt
Dim oNode As SmartArtNode
Dim lRow As Long
Dim lCol As Long
Dim sFontName As String
sFontName = "Arial"
With ActivePresentation
For Each oSl In .Slides
For Each oSh In oSl.Shapes
With oSh
If .HasTextFrame Then
If .TextFrame.HasText Then
.TextFrame.TextRange.Font.Name = sFontName
End If
End If
End With
Next
Next
End With
For Each oSh In oSl.Shapes
If oSh.HasTable Then
Set oTbl = oSh.Table
For lRow = 1 To oTbl.Rows.Count
For lCol = 1 To oTbl.Columns.Count
With oTbl.Cell(lRow, lCol).Shape.TextFrame.TextRange
.Font.Name = "Arial"
End With
Next
Next
ElseIf oSh.HasSmartArt Then
For Each oNode In oSh.SmartArt.AllNodes
oNode.TextFrame2.TextRange.Font.Name = "Arial"
Next
End If
Next
Next oSl End Sub