Detecting shapes in groups

  • Thread starter Thread starter Raist via OfficeKB.com
  • Start date Start date
R

Raist via OfficeKB.com

Hello, I am writing an application where I need to detect witch shape in a
group is selected.

I need to be able to change the text in a shape, and the name of the shape.
This is not a problem if the selected shape is not a part of a group. I need
to be able to detect witch of the shapes in a group is curently selected.

Thanks...
 
Raist,
Take a look at this example:
'===============================================
Sub ShapeSelectionWithinGroup()
With ActiveWindow.Selection
If .ShapeRange(1).Type = msoGroup Then
If .HasChildShapeRange Then
'First shape in the selection within the group
With .ChildShapeRange(1)
.TextFrame.TextRange.Text = "Test"
End With
End If
End If
End With
End Sub
'===============================================
 

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

Back
Top