Dont know why you got a smiley (I did too) but you need to AddTextbox NOT
AddShape I think
Substitute this in your code and see if it works
.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=100, _
Top:=300, Width:=100, Height:=100)
Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
> Hello,
>
[quoted text clipped - 33 lines]
>
> End Sub
Geoff Cox - 30 Oct 2006 13:18 GMT
>.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=100, _
>Top:=300, Width:=100, Height:=100)
Thanks John - that did the trick!
How about the one below? The aim is to click on shpAnswer to move the
shpRectangle in the way defined by the FromX etc.
This works and uses the FromX etc co-ordinates and ignores the
effectId:=msoAnimEffectPathCurvyStar, _
which is fine! But what should replace this parameter? A gap is not
allowed and adding msoAnimEffectCustom is wrong.
Cheers
Geoff
Sub AddShapeSetTiming()
Sub AddShapeSetTiming()
Dim effDiamond As Effect
Dim shpRectangle As Shape
Dim aniMotion As AnimationBehavior
Dim shpAnswer As Shape
'create shape to be clicked
Set shpAnswer = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=400, Width:=75, Height:=50)
shpAnswer.TextFrame.TextRange.Text = "answer"
'create shape to be moved
Set shpRectangle = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=200, Width:=75, Height:=50)
shpRectangle.TextFrame.TextRange.Text = "word"
'effect applies to the shape to be moved when other shape is clicked
Set effDiamond = _
ActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add _
.AddEffect(Shape:=shpRectangle, _
effectId:=msoAnimEffectPathCurvyStar, _
Trigger:=msoAnimTriggerOnShapeClick)
With effDiamond.Timing
.Duration = 2
.TriggerDelayTime = 0
End With
Set aniMotion = effDiamond.Behaviors.Add(msoAnimTypeMotion)
With aniMotion.MotionEffect
.FromX = 0.00000638889
.FromY = -0.0000037037
.ToX = 0.48039
.ToY = -0.32569
End With
effDiamond.Timing.TriggerShape = shpAnswer
End Sub
Hi,
You get the smiley face when adding a shape because the constants share
the same value.
msoShapeSmileyFace = 17
msoTextBox = 17
Use the AddTextbox method as suggested by John.
Cheers
Andy
> Hello,
>
[quoted text clipped - 33 lines]
>
> End Sub

Signature
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
John Wilson - 30 Oct 2006 12:50 GMT
Thanks Andy, mystery solved!
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
> Hi,
>
[quoted text clipped - 46 lines]
> >
> > End Sub