Try this
Sub nameofsub(oshp As Shape)
Dim oshp As Shape
Dim strName As String
Dim strText As TextColumn2
strName = oshp.Name
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
strText = oshp.TextFrame.TextRange
End If
End If
End Sub

Signature
Amazing PPT Hints, Tips and Tutorials-
http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
> Does any one know how i can get the shape name or text inside the
> shape when the user click on it and i active a macro?
> i need to know that on the macro itself...
> i have few shapes with the same macro on them
> thenks :)
nushi - 24 Sep 2007 16:12 GMT
it does'nt work...
i have this code :
Sub AddGroup(oshp As Shape)
Dim x As Integer
Dim y As Integer
x = 130
y = 170
Dim mySlide As Slide
Dim oshp As Shape
Dim strName As String
Dim strText as TaxtColumn2
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
strText = oshp.TextFrame.TextRange
End If
End If
Set mySlide = ActivePresentation.Slides.Item(13)
Dim NumberOfElements As Integer
NumberOfElements = mySlide.Shapes.Count
x = x + ((NumberOfElements - 2) * 30)
y = y + ((NumberOfElements - 2) * 30)
If (x > 250) Then
x = x - (x - 120)
End If
If (y > 250) Then
y = y - (y - 120)
End If
mySlide.Shapes.Title.TextFrame.TextRange.text = strText.text
Dim myShape As Shape
Set myShape = mySlide.Shapes.AddShape(msoShapeOval, x, y, 272.12,
272.12)
End Sub
the problem is that my PowerPoint Macro Editor does'nt know what is
TextColumn and it looks like i can't go into the macro from my
powerpoint if i use Sub AddGroup(oshp As Shape)
thenks for all your help...
John Wilson - 24 Sep 2007 16:40 GMT
Sorry that was an example of DIM flying fingers
I meant "as String"

Signature
Amazing PPT Hints, Tips and Tutorials-
http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
> it does'nt work...
> i have this code :
[quoted text clipped - 33 lines]
> powerpoint if i use Sub AddGroup(oshp As Shape)
> thenks for all your help...
> Does any one know how i can get the shape name or text inside the
> shape when the user click on it and i active a macro?
> i need to know that on the macro itself...
> i have few shapes with the same macro on them
> thenks :)
Give the shape an action setting of Run Macro and assign it to run this macro:
Sub AboutThisShape(oShp As Shape)
MsgBox oShp.Name
If oShp.HasTextFrame Then
If oShp.TextFrame.HasText Then
MsgBox oShp.TextFrame.TextRange.Text
End If
End If
End Sub
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
nushi - 24 Sep 2007 16:18 GMT
> In article <1190636587.526644.158...@k79g2000hse.googlegroups.com>, Nushi
> wrote:
[quoted text clipped - 24 lines]
> PPTools: www.pptools.com
> ================================================
thenks that helped
:):):)