2015-05-01 57 views

回答

0

默認字體來自字體主題(演示文稿主題的一部分,儘管您可以從設計選項卡中選擇不同的字體主題)。通過代碼更改字體:

Sub ChangeSmartArtFont() 
    Dim oSh As Shape 
    Dim oSmartArt As SmartArt 
    Dim x As Long 

    Set oSh = ActiveWindow.Selection.ShapeRange(1) 
    If oSh.HasSmartArt Then 
     Set oSmartArt = oSh.SmartArt 
     With oSmartArt 
      For x = 1 To .Nodes.Count 
       With .Nodes(x).TextFrame2 
        .TextRange.Font.Name = "Algerian" 
       End With 
      Next 
     End With 
    End If 
End Sub