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