2007版本ppt行间距、字体批量设立

2007版本ppt行间距、字体批量设置

2007版本ppt行间距、字体批量设置

使用菜单批量替换字体


2007版本ppt行间距、字体批量设立
 

使用宏命令批量设置字体、行间距

如果是好几百张PPT就使用下面的代码完成。按下ALT+F11,打开VBE对话框,单击插入——模块,复制下面的代码,按F5键运行就可以完成PPT行间距设置。

 

Sub ChangeTextFont()
Set pages = ActivePresentation.Slides.Range
pageCount = pages.Count
'第一页和最后一页跳过
For i = 2 To pageCount - 1
DoEvents
ActiveWindow.View.GotoSlide Index:=i
shapeCount = ActiveWindow.Selection.SlideRange.Shapes.Count
For j = 1 To shapeCount
ActiveWindow.Selection.SlideRange.Shapes(j).Select
shapeType = ActiveWindow.Selection.SlideRange.Shapes(j).Type
'1 - 自选图形
'7 - 公式
'13 - 图片
'14 - 占位符
'15 - 艺术字
'17 - 文本框
'19 - 表格
'Debug.Print shapeType
Select Case shapeType
Case 1, 14, 17
Set txtRange = ActiveWindow.Selection.ShapeRange.TextFrame.TextRange
txtRange.Select
If txtRange.Text <> "" Then
'设置字体为宋体, 24号
With txtRange.Font
.Name = "宋体"
.Size = 24
End With
'设置段落格式为1.3倍行距
With txtRange.ParagraphFormat
.SpaceWithin = 1.3
End With
End If
Case 7, 13, 15
Case 19
End Select
Next j
Next i
End Sub
 
其实这就是一个宏命令,注意要保证你的ppt启动了宏。