msoAnimEffectPath Problem.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am into Powerpoint Automation. I m trying to use the msoAnimEffectPath
Animation effect (using timeline object for PPT 2002). What I am not able to
get is how to programmatically decide the length of the path. I can assign
(say) msoAnimEffectPathLeft to a shape but I am not able to assign the length
of the path.

Can anyone help me in this please?

Thanks.
 
Edit the length by changing the values of the 1st behavior of the effect.
The length is stored in a VML path.

?activepresentation.Slides(1).TimeLine.MainSequence(1).Behaviors(1).MotionEffect.Path
M 0 0 L -0.25 0 E
 
Hi,
I have been trying to implement that path animation in my application but
its coming fine. I also took help from http://www.mcse.ms/message637367.html
but stil the animation is not as per the requirement of application. I
applied the motioneffect.path but things are messing up. What I want is a
rectangle to appear om (x,y) cordinates. This I have done. Then I want that
rectangle to get animated upwards and move to (x,y-15). I am posting the sub
that I m using for my appication. I m posting this just to give an idea how I
am applying motioneffect.

**************************************************
Sub EffectsSlide17A(effect_ As Object, Index As Long, xPos As Long, yPos As
Long, temptextproperty As TextProperty_, Optional ForText As Long = 1)

Dim aniMotion 'As AnimationBehavior
'Dim effNew 'As effect_
On Error Resume Next

With effect_
.Timing.TriggerType = IIf(InStr(effect_.Shape.Name, "Text"),
msoAnimTriggerWithPrevious, msoAnimTriggerWithPrevious)
.Timing.TriggerDelayTime = 0
.EffectType = IIf(InStr(effect_.Shape.Name, "Text"),
msoAnimEffectAppear, msoAnimEffectAppear)
.EffectParameters.Direction = msoAnimDirectionHorizontalOut
'IIf(InStr(effect_.Shape.Name, "Text"), msoAnimDirectionHorizontalOut,
msoAnimDirectionHorizontalOut)
End With

Set effect_ =
temptextproperty.ParentSlide.TimeLine.MainSequence.AddEffect(Shape:=effect_.Shape, effectId:=msoAnimEffectCustom, _
Trigger:=msoAnimTriggerWithPrevious)
effect_.Timing.TriggerDelayTime = 1

Set aniMotion = effect_.Behaviors.Add(msoAnimTypeMotion)

effect_.Timing.Duration = 1
With aniMotion.MotionEffect
.FromX = xPos
.FromY = yPos
.ToX = xPos
.ToY = yPos - 15
End With

End Sub
**********************************************************

I created the rectangle in another procedure and then I am calling this
(above) sub from that funtion.

1.) Can anyone please let me know what mistake I m doing?
2.) I would like to know how to use the VML path and how to specify VML path
in my program.
3.) In powerpoint, under MsoAnimEffects we have many msoAnimEffectPath
types.....what are they for? Can we use them for path animations? If yes,
then how.

Thanks.
 
1.) Can anyone please let me know what mistake I m doing?
Please read my reply carefully to the posting you pointed to
(http://www.mcse.ms/message637367.html ) again . You are making the same
mistake.

2.) I would like to know how to use the VML path and how to specify VML
path
in my program.
Read the segment pertaining to the path element to understand VML for motion
paths
http://www.w3.org/TR/1998/NOTE-VML-19980513

3.) In powerpoint, under MsoAnimEffects we have many msoAnimEffectPath
types.....what are they for? Can we use them for path animations? If yes,
then how.
There are several types of motion paths available, the only difference is
that each type has a different motion vml path set. You can edit it as well
as create your own.


--
Regards,
Shyam Pillai

Toolbox: http://skp.mvps.org/toolbox
 
Back
Top