N
Nick
Hi there,
I'm automating PowerPoint and trying to animate a single text frame.
The text frame is much taller than the page but the same width as the page.
I would like to scroll it up from (Y = 50) until all the text has been
shown but am not sure how to setup the behaviors. This is what I currently
have,
pObjSlide.Shapes(1).top = 50
Dim pObjMotionEffect As Object =
pObjSlide.TimeLine.MainSequence.AddEffect(pObjSlide.Shapes(1), _
msoAnimEffectPathUp, _
msoAnimTriggerOnPageClick)
pObjMotionEffect.EffectParameters.Amount = pObjSlide.Shapes(1).Height
Unfortunately the value for Amount isn't accepted, presumably it's too
large. I have also tried the following,
pObjSlide.Shapes(1).top = 50
Dim pObjMotionEffect As Object =
pObjSlide.TimeLine.MainSequence.AddEffect(pObjSlide.Shapes(1), _
msoAnimEffectCustom, _
msoAnimTriggerOnPageClick)
Dim pObjAnimMotion As Object =
pObjMotionEffect.Behaviors.Add(msoAnimTypeMotion)
With pObjAnimMotion.MotionEffect
.FromX = (pObjSlide.Shapes(1).Width / 2)
.FromY = 50 + (pObjSlide.Shapes(1).Height / 2)
.ToX = .FromX
.ToY = (.FromY - pObjSlide.Shapes(1).Height)
End With
I offset the translation point to the centre of the object, presuming
that it translates the coordinates from the center. I have tried
translating from the top left of the object too but the animation just
doesn't work.
Any ideas how I can achieve this effect? Thanks for your time in advance.
Nick.
I'm automating PowerPoint and trying to animate a single text frame.
The text frame is much taller than the page but the same width as the page.
I would like to scroll it up from (Y = 50) until all the text has been
shown but am not sure how to setup the behaviors. This is what I currently
have,
pObjSlide.Shapes(1).top = 50
Dim pObjMotionEffect As Object =
pObjSlide.TimeLine.MainSequence.AddEffect(pObjSlide.Shapes(1), _
msoAnimEffectPathUp, _
msoAnimTriggerOnPageClick)
pObjMotionEffect.EffectParameters.Amount = pObjSlide.Shapes(1).Height
Unfortunately the value for Amount isn't accepted, presumably it's too
large. I have also tried the following,
pObjSlide.Shapes(1).top = 50
Dim pObjMotionEffect As Object =
pObjSlide.TimeLine.MainSequence.AddEffect(pObjSlide.Shapes(1), _
msoAnimEffectCustom, _
msoAnimTriggerOnPageClick)
Dim pObjAnimMotion As Object =
pObjMotionEffect.Behaviors.Add(msoAnimTypeMotion)
With pObjAnimMotion.MotionEffect
.FromX = (pObjSlide.Shapes(1).Width / 2)
.FromY = 50 + (pObjSlide.Shapes(1).Height / 2)
.ToX = .FromX
.ToY = (.FromY - pObjSlide.Shapes(1).Height)
End With
I offset the translation point to the centre of the object, presuming
that it translates the coordinates from the center. I have tried
translating from the top left of the object too but the animation just
doesn't work.
Any ideas how I can achieve this effect? Thanks for your time in advance.
Nick.