select all shapes from page

D

dange

Hi,

I have several frames in a document, only one frame per page. In every frame
are several shapes.
How can I select all shapes in a frame or on a single page when I dont know
the number of shapes in advance.

Thanks
Dan
 
C

Cindy M.

Hi =?Utf-8?B?ZGFuZ2U=?=,
I have several frames in a document, only one frame per page. In every frame
are several shapes.
How can I select all shapes in a frame or on a single page when I dont know
the number of shapes in advance.
You can use the ShapeRange property of the Range object. To get the Range for
the current page:

Set rngPage = ActiveDocument.bookmarks("\Page").Range

For a frame on that page:

Set rngFrame = rngPage.Frames(1).Range

To select all the Shapes in a range:
rng.ShapeRange.Select

However, Shapes are seldom anchored within a frame. You may mean InlineShapes?
If yes, there's no way to select all InlineShapes at once using the object
model. You'd have to loop through them:
For each ils in rng.InlineShapes
Next

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
D

dange

Hi Cindy

That "/Page" thing was exactly what I was looking for!
Thanks for your help.

Dan
 

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