VBA powerpoint 插入文本框

来源:百度知道 编辑:UC知道 时间:2024/05/04 14:28:04
我有一个幻灯片文件,现在要在第二张幻灯片上插入一个文本框。怎么用VBA实现?? office 2000 SlideShowWindows(Index:=1).View.Next 貌似不行,不知为什么

Sub Macro1()
'
' 宏由 admin 记录,日期: 2009.04.16
'

ActiveWindow.Selection.SlideRange.Shapes.AddTextbox(msoTextOrientationHorizontal, 223.875, 77.25, 175.875, 28.875).Select
ActiveWindow.Selection.ShapeRange.TextFrame.WordWrap = msoTrue
With ActiveWindow.Selection.TextRange.ParagraphFormat
.LineRuleWithin = msoTrue
.SpaceWithin = 1
.LineRuleBefore = msoTrue
.SpaceBefore = 0.5
.LineRuleAfter = msoTrue
.SpaceAfter = 0
End With
End Sub

你录制一个宏试试