View Single Post
  #4  
Old 01-11-2008, 19:26
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,787
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Find

Just name the shape and find it by its name.
Code:
Set s = ActivePage.FindShape(Name:="MyShapeName")
If you are sure all the other shapes are inside the shape you just found then select them from the bounding boxes of this shape.
Code:
Sub MySelection()
    Dim s As Shape, sFound As Shape
    Dim x As Double, y As Double, w As Double, h As Double
    
    ActiveDocument.ReferencePoint = cdrBottomLeft
    Set s = ActivePage.FindShape(Name:="MyShapeName")
    
    s.GetPosition x, y
    s.GetSize w, h

    Set sFound = ActivePage.SelectShapesFromRectangle(x, y, x + w, y + h, False)
End Sub
Best of luck,
-Shelby
Reply With Quote