VBA 取消组合形状 (SmartArt)
VBA ungroup Shape (SmartArt)
有谁知道如何通过 VBA 取消组合 SmartArt 元素?
Sub UngroupSmartArt()
Dim shapeWithSmartArt As Shape
Set shapeWithSmartArt = ActivePresentation.Slides(2).Shapes(2)
shapeWithSmartArt.Ungroup
End Sub
此代码出现错误:
"This member can only be accessed for a group."
这对我来说没有任何意义,因为在 powerpoint 中很容易做到这一点(右键单击 SmartArt -> 组合 -> 取消组合)。这让我抓狂:)
谁能帮我取消分组 SmartArt element/shape?
我也看过类似的 question,但它不能正常工作,因为未分组的结果与通过 powerpoint 本身制作的结果不同。
请帮帮我。我真的很感激任何帮助!
通过 VB 代码根本不可能做到这一点。这也是微软的声明。使用 SmartArt 的缺点还在于用户无法使用宏(使用 Excel)记录在此类 object/element 上执行的任何操作。
也无法通过VB更改SmartArt节点的宽度或高度属性,这实际上是我想将SmartArt元素更改为形状的原因,因为您可以轻松更改宽度和形状的高度 属性 通过代码。
Microsoft 及其开发人员确实应该考虑让 SmarArt 元素对开发人员更加友好,因为我注意到我不是唯一遇到这些问题的人。
编辑: 找到解决方案!有一种方法可以从 powerpoint 功能区执行命令。您需要先 select 您的形状,然后执行 CommandBars.ExecuteMso 操作:SmartArtConvertToShapes。
Sub UngroupSmartArt()
Dim shapeWithSmartArt As Shape
Set shapeWithSmartArt = ActivePresentation.Slides(2).Shapes(2)
shapeWithSmartArt.Select
CommandBars.ExecuteMso("SmartArtConvertToShapes")
End Sub
这仍然不改变事实和我的观点:微软真的应该考虑让SmartArt元素对开发者更友好!
有谁知道如何通过 VBA 取消组合 SmartArt 元素?
Sub UngroupSmartArt()
Dim shapeWithSmartArt As Shape
Set shapeWithSmartArt = ActivePresentation.Slides(2).Shapes(2)
shapeWithSmartArt.Ungroup
End Sub
此代码出现错误: "This member can only be accessed for a group."
这对我来说没有任何意义,因为在 powerpoint 中很容易做到这一点(右键单击 SmartArt -> 组合 -> 取消组合)。这让我抓狂:)
谁能帮我取消分组 SmartArt element/shape?
我也看过类似的 question,但它不能正常工作,因为未分组的结果与通过 powerpoint 本身制作的结果不同。
请帮帮我。我真的很感激任何帮助!
通过 VB 代码根本不可能做到这一点。这也是微软的声明。使用 SmartArt 的缺点还在于用户无法使用宏(使用 Excel)记录在此类 object/element 上执行的任何操作。
也无法通过VB更改SmartArt节点的宽度或高度属性,这实际上是我想将SmartArt元素更改为形状的原因,因为您可以轻松更改宽度和形状的高度 属性 通过代码。
Microsoft 及其开发人员确实应该考虑让 SmarArt 元素对开发人员更加友好,因为我注意到我不是唯一遇到这些问题的人。
编辑: 找到解决方案!有一种方法可以从 powerpoint 功能区执行命令。您需要先 select 您的形状,然后执行 CommandBars.ExecuteMso 操作:SmartArtConvertToShapes。
Sub UngroupSmartArt()
Dim shapeWithSmartArt As Shape
Set shapeWithSmartArt = ActivePresentation.Slides(2).Shapes(2)
shapeWithSmartArt.Select
CommandBars.ExecuteMso("SmartArtConvertToShapes")
End Sub
这仍然不改变事实和我的观点:微软真的应该考虑让SmartArt元素对开发者更友好!