用Office PowerPoint制作幻燈片時(shí),微軟雅黑是一款視覺效果較好的字體,而且所有Office都預(yù)置了該字體,不用擔(dān)心字體未安裝的情況。如何一鍵修改PPT所有內(nèi)容的字體為“微軟雅黑”?這里分享一個(gè)VBA小工具。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-770513.html
Sub SetAllFontToYahei()
''' set all fonts to 微軟雅黑
Dim sld As Slide
Dim shp As Shape, chd As Shape
Dim i&, j&
For Each sld In ActivePresentation.Slides
i = i + 1
Debug.Print "Slide " & i
For Each shp In sld.Shapes
j = j + 1
Debug.Print vbTab & "Shape " & j
If shp.Type = msoGroup Then
For Each chd In shp.GroupItems
If chd.HasTextFrame Then
chd.TextFrame.TextRange.Font.Name = "微軟雅黑"
chd.TextFrame.TextRange.Font.NameFarEast = "微軟雅黑"
End If
Next
ElseIf shp.HasTextFrame Then
shp.TextFrame.TextRange.Font.Name = "微軟雅黑"
shp.TextFrame.TextRange.Font.NameFarEast = "微軟雅黑"
End If
Next
Next
MsgBox "Task completed!"
End Sub
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-770513.html
到了這里,關(guān)于PowerPoint VBA: 一鍵雅黑——一鍵將PPT所有內(nèi)容改為微軟雅黑字體的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!