VB.NET Powerpoint Animation

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top