VBA powerpoint。将形状设置为变量

VBA powerpoint。将形状设置为变量,vba,object,shape,Vba,Object,Shape,我有一个非常简单的问题,我搜索了如何选择powerpoint形状,我找到的代码如下 Presentation.Slide(1).Shape(1) 但当我这么做的时候 Dim a As Shape Set a=Presentation.Slide(1).Shape(1) 我的类型不匹配。presentation.slide().shape()命令返回什么对象类?。MSDN网站说它是一个形状对象(“只读”,我不知道这是什么意思) . 那么为什么上面的代码会出现不匹配错误呢 另外,我如何知道一行

我有一个非常简单的问题,我搜索了如何选择powerpoint形状,我找到的代码如下

Presentation.Slide(1).Shape(1)
但当我这么做的时候

Dim a As Shape
Set a=Presentation.Slide(1).Shape(1)
我的类型不匹配。presentation.slide().shape()命令返回什么对象类?。MSDN网站说它是一个形状对象(“只读”,我不知道这是什么意思) .

那么为什么上面的代码会出现不匹配错误呢

另外,我如何知道一行代码将返回哪类对象。例如,我想在控制台中编写类似的内容,以获取它生成的对象的类

Class(Presentantion.Slide(1).Shape(1))

(如果有控制台)

您发布的代码中有一些拼写错误

typename(activepresentation.slides(1).shapes(1))
我想我会给你想要的