首页 > PPT专区 > PPT教程 >

PPT批量修改幻灯片字体、大小、颜色的方法

PPT教程 2022-01-06 21:13:30

只需要将以下VBA代码中红色字体,替换成需要更改的字体参数,然后将修改完成的VBA代码放入VBA编辑器中运行即可!只适合PPT2007及其以上版本!

Sub change()

Dim oShape As Shape

Dim oSlide As Slide

Dim oTxtRange As TextRange

On Error Resume Next

For Each oSlide In ActivePresentation.Slides

For Each oShape In oSlide.Shapes

Set oTxtRange = oShape.TextFrame.TextRange

If Not IsNull(oTxtRange) Then

With oTxtRange.Font

.Name = "楷体_GB2312" '更改为需要的字体

.Size = 15 '改为所需的文字大小

.Color.RGB = RGB(Red:=255, Green:=120, Blue:=0) '改成想要的文字颜色,用RGB参数表示

End With

End If

Next

Next

End Sub


标签: 参数字体改为颜色PPT制作教程

office教程网 Copyright © 2016-2020 https://www.office9.cn. Some Rights Reserved.