VB.NET Powerpoint Animation

  • Thread starter Thread starter Naro25
  • Start date Start date
N

Naro25

Hi,

Could someone please help me in applying an animation to an object in
powerpoint through VB.NET. I'm only a beginner and have tried my best to
figure it out with something like the following code which is two objects
using one as the trigger.
I managed to get it working in pptVBA but just can't get it to work in .NET.
I keep getting an error COMException was unhandled.
I cant seem to find any example of this on the internet to work with either.

Any help with this would be extremely appreciated!!!

Many thanks
FustratedNaro25

Imports PowerPoint = Microsoft.Office.Interop.PowerPoint
Dim intereffect as powerpoint.effect
Dim oShape/sPic as powerpoint.shape

With oApp.ActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add(1)
interEffect = .AddEffect(oShape,
PowerPoint.MsoAnimEffect.msoAnimEffectFly,
PowerPoint.MsoAnimTriggerType.msoAnimTriggerOnShapeClick)
interEffect.Shape = sPic

With interEffect
.EffectParameters.Direction =
PowerPoint.MsoAnimDirection.msoAnimDirectionLeft
.Timing.Duration = 0.5
End With
End With
 
Back
Top