[英]Powerpoint - Save group as image via VBA
我想将一个组保存为 png-Image。
我能够将图像导出为完整的幻灯片,但我无法弄清楚如何仅导出特定组。
这适用于幻灯片:
Private Sub CommandButton1_Click()
neuerText = TextBox1.Value
ActivePresentation.Slides(1).Export "C:\bla\" & neuerText & ".png", "PNG"
End Sub
但是如何只选择一个组呢? 例如
ActivePresentation.Slides(1).Shapes("Group 1").Export "C:\bla\" & neuerText & ".png", "PNG"
理想情况下,图像应具有透明背景。
有谁知道我怎么能做到这一点?
使用ShapeRange
对象应该可以工作。
Private Sub CommandButton1_Click()
neuerText = TextBox1.Value
Dim myGroup As ShapeRange
Set myGroup = ActivePresentation.Slides(1).Shapes.Range("Group 1")
myGroup.Export "C:\bla\" & neuerText & ".png", ppShapeFormatPNG
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.