Select Shape using a GUID

I

Iwan van Ee

If I have a GUID of a Shape and this Shape is on the Page I can refer to it
by using:

Set shpObj = ActivePage.Shapes(sGUID)

But, if this Shape is in a group I Can't refer to it... I get an error. I
already have a referens to the group Shape:

Set grpObj = ActivePage(sGUIDGrp)
Set shpObj = grpObj.Shapes(sGUID)

Why can't I use this possibility using GUID's in the Shapes Collection of a
Shape that is a Group.....
 
M

Mark Nelson [MS]

From the help topic:

To search all shapes in the collection, plus the shapes inside groups and
the containing shape of the collection, prefix the unique ID string with an
asterisk (*). For example:

objRet = vsoShapes.Item("*{2287DC42-B167-11CE-88E9-0020AFDDD917}")
 
I

Iwan van Ee

Excellent... it worked.

But even if I know what I am lokking for now I still can't find this
information in the Help topics. I really can't find anything in the help
topics at all ;(
 
A

Al Edlund

Mark,
nice tip, where is it written up?
Al
Mark Nelson said:
From the help topic:

To search all shapes in the collection, plus the shapes inside groups and
the containing shape of the collection, prefix the unique ID string with
an asterisk (*). For example:

objRet = vsoShapes.Item("*{2287DC42-B167-11CE-88E9-0020AFDDD917}")


--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no
rights.
 
M

Mark Nelson [MS]

That was part of the Shapes.Item property help topic.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Al Edlund

neat, thanks,
Al
Mark Nelson said:
That was part of the Shapes.Item property help topic.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no
rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top