0
我有很多幻灯片,每个都有一个单词艺术。我希望将艺术字排列在幻灯片的绝对中心。我试过的代码是:如何使用vba在PowerPoint中改变对象的垂直和水平位置,例如艺术字?
Option Explicit
Sub format()
Dim sl As Slide
Dim ob As Object
For Each sl In ActivePresentation.Slides
For Each ob In sl.Shapes
With ob.TextFrame
' .TextRange.Paragraphs.ParagraphFormat.Alignment = ppAlignCenter
' .TextRange.Paragraphs.ParagraphFormat.Alignment = ppAlignMiddle
.HorizontalAnchor = msoAnchorCenter
.VerticalAnchor = msoAnchorMiddle
End With
Next ob
Next sl
End Sub
谢谢我下次尝试这个时候需要它。 –
这很有魅力。谢谢。 –