通过 ID 或名称获取形状
如果您知道形状的 Id
,有什么方法可以获取它吗?
例如:
Dim myshape As Shape
myshape.Id = 42
myshape = getShapeById(myshape.Id)
或者,我可以通过 Name
获取形状吗?
Dim myshape As Shape
myshape.Name = "Rectangle 42"
myshape = getShapeByName(myshape.Name)
Is there any way to get a shape if you know its Id
?
For example:
Dim myshape As Shape
myshape.Id = 42
myshape = getShapeById(myshape.Id)
Or, alternatively, could I get the shape by Name
?
Dim myshape As Shape
myshape.Name = "Rectangle 42"
myshape = getShapeByName(myshape.Name)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通过
.Id
获取形状.Name
比 通过.Name
获取其.Id
。但它是这样实现的:
Getting a shape
.Name
by its.Id
is somewhat more convoluted than getting its.Id
by its.Name
.But here's how it's done:
要通过
Name
获取Shape
,您需要...:To get a
Shape
byName
, you do...:其中,
k
是幻灯片编号,j
是该幻灯片上的形状编号。您可以使用以下内容循环浏览每个页面形状:
Chris
where
k
is the slide number andj
and the shape number on that slide.You can loop through each pages shapes with something like:
Chris