|
发表于 2021-8-13 09:27
来自手机
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 lss001 于 2021-8-14 11:53 编辑
Sub ppt表格格式设置()
Dim oShape As Shape, oSlide As Slide, rng As TextRange, ppt As Presentation
Set ppt = Application.ActivePresentation
For Each oSlide In ppt.Slides
For Each oShape In oSlide.Shapes
'判断是否含有表格
If oShape.HasTable Then
With oShape.Table
For i = 1 To .Rows.Count
For j = 1 To .Columns.Count
Set rng = .Cell(i, j).Shape.TextFrame.TextRange
With rng.Font
.Name = "微软雅黑" '字体
.Size = 10 '大小
.Color = RGB(255, 120, 0)'颜色//RGB
End With
Next j, i
End With
End If
Next
Next
End Sub |
|