Sub 修改特定大小的字
Dim oSl As Slide
Dim oSh As Shape
Dim sFontName As String
Dim Ctr As Integer
Dim Cl As Cell
' 这里设定需要改掉的字体大小:
nFontSize = "18"
' 这里设定需要修改后的大小:
sFontSize = "56"
With ActivePresentation
For Each oSl In .Slides
For Each oSh In oSl.Shapes
With oSh
Select Case .Type
' 判断组合对象部分
Case msoGroup
For Ctr = 1 To .GroupItems.Count
If .GroupItems(Ctr).HasTextFrame Then
If .GroupItems(Ctr).TextFrame.TextRange.Font.Size = nFontSize Then
.GroupItems(Ctr).TextFrame.TextRange.Font.Size = sFontSize
End If
End If
Next Ctr
' 判断表格对象部分
Case msoTable
For Ctr = 1 To .Table.Rows.Count
For Each Cl In .Table.Rows(Ctr).Cells
If Cl.Shape.HasTextFrame Then
If Cl.Shape.TextFrame.HasText Then
If Cl.Shape.TextFrame.TextRange.Font.Size = nFontSize Then
Cl.Shape.TextFrame.TextRange.Font.Size = sFontSize
End If
End If
End If
Next Cl
Next Ctr
' 判断其他对象(文本框)部分
Case Else
If .HasTextFrame Then
If .TextFrame.HasText Then
If .TextFrame.TextRange.Font.Size = nFontSize Then
.TextFrame.TextRange.Font.Size = sFontSize
End If
End If
End If
End Select
End With
Next
Next
End With
End Sub
回复【字体代码】
可以下载代码的txt文件哦
这组代码跟前面的代码有区别哦
对了
一直以来我都在坚持用全图的形式来做文章,消费了大家不少的流量,不过这也是嘉文钱想让大家有最好的阅读体验,如果你们有任何意见或者建议,不要犹豫,立刻在后台告诉我吧!后台留言一般我都会看和回复的(如果没有回复的话,那我那段时候肯定是忘记了账号和密码)希望大家以后还能支持我的公众账号,还有我跟阿文的在线课程【和阿文一起学信息图表】,谢谢大家啦~~
3.21~3.31秋叶系列课程春季大促!
购买课程打折还送书!
先领券【满299-40】,然后再购买两门课
购买后微博私信地址和购买信息给@秋叶
就能收书啦~
【阅读原文】有课程直达链接哦!