我想中心对齐大型演示文稿中的文本框。每张幻灯片包含各种形状,但只有一个文本框中包含文本,我希望该文本框与幻灯片的中心对齐。目前,我有一行代码可以使文本中心在自己的文本框中对齐,但我想知道是否有在幻灯片中间创建文本框的方法?幻灯片宏中心对齐单个文本框来滑动
Sub TextSize()
Dim oSl As Slide
Dim oSh As Shape
With ActivePresentation
For Each oSl In .Slides
For Each oSh In oSl.Shapes
With oSh
If .HasTextFrame Then
If .TextFrame.HasText Then
.TextFrame.TextRange.Font.Size = 26.5
' change the code to make the text box centre aligned to the slide
.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
End If
End If
End With
Next
Next
End With
End Sub
这工作完美,非常感谢您的时间和建议。 – Abby 2014-10-01 12:26:28