LegendEntries 集合在 Locals 窗格中不可见

LegendEntries collection not visible from Locals pane

当我检查 Legend object in the Locals pane, I don't see the LegendEntries collection.

我只是从 Microsoft's online documentation 那里了解到 LegendEntries。

为什么“局部变量”窗格中看不到 LegendEntries?

除了 Locals 窗格 之外,我还有哪些其他选项可以探索对象模型?

查看对象浏览器,可以看到Legend.LegendEntries是一个方法(一个FunctionSub);本地窗格仅显示属性 (Property Get)。

documentation of the member (not the docs on the collection itself中也以这种方式呈现,但关于从Legend访问集合所需的成员):

Legend.LegendEntries method (PowerPoint)

在VBA中不是很明显,因为VBA在调用无参方法时不需要括号。但是,如果您从一种确实需要括号来调用此类方法的语言访问 PowerPoint 对象模型,您会立即看到区别。

除了 Microsoft documentation of the Office object models对象浏览器视图 -> 对象浏览器,或按 F2) 显示给定类型的所有成员,包括方法。


注意。默认情况下,对象浏览器不显示“隐藏成员”,它们在代码编辑器的完成列表中也不可见 window。要查看此类成员,请右键单击对象浏览器中的任意位置并选择 显示隐藏成员 选项。隐藏的成员将以浅灰色显示,如上图所示。

另请注意,无论是否选择此选项,使用这些隐藏成员的代码都将编译并 运行 成功。