将每张幻灯片的形状/对象分组并在PowerPoint演示文稿中翻转

问题描述 投票:0回答:1

我是Powerpoint VBA的新手,我想将每个Powerpoint幻灯片中的所有形状/对象分组并水平翻转,以将字体转换为所有Presentaion幻灯片中的arial这是我到达的代码,但是将每个形状单独分组,我无法在翻转前添加分组,请告知

Sub DTPMacro()

Dim sld As Slide
Dim shp As Shape
Dim sFontName As String

' Edit this as needed:
sFontName = "Arial"

With ActivePresentation
    For Each sld In .Slides
        For Each shp In sld.Shapes
         shp.Flip msoFlipHorizontal
            With shp
                If .HasTextFrame Then
                    If .TextFrame.HasText Then
                        .TextFrame.TextRange.Font.Name = sFontName
                    End If
                End If
            End With
        Next
    Next
End With

结束子

powerpoint-vba
1个回答
0
投票

尝试以下方法:

© www.soinside.com 2019 - 2024. All rights reserved.