Powerpoint Animation

Add-in Express™ Support Service
That's what is more important than anything else

Powerpoint Animation
How to remove all animations/transitions 
Tobias Böhm




Posts: 73
Joined: 2009-07-06
Hi Guys,

I would like to remove all animation and all slide transitions from the current presentation.
Do you know any way to do this?

In 2007-VBA I can at least get rid of animations by deleting all TimeLine.MainSequence-Items of the slides but I can't find the property in ADX, I guess because it's version dependend.

Thanks a lot,
Tobi
Posted 06 Jan, 2010 10:58:06 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Tobias,

In 2007-VBA I can at least get rid of animations by deleting all TimeLine.MainSequence-Items of the slides but I can't find the property in ADX, I guess because it's version dependend.


You are right. You just need to use version specific PIAs. Please read more about that in the documentation (we supply the adxnet.pdf file).
.NET, Extended MAPI, Windows Phone & RT
Posted 06 Jan, 2010 11:13:39 Top
Tobias Böhm




Posts: 73
Joined: 2009-07-06
That's a bummer.
Could you please tell me the section where using multiple version-specific PIAs is explained? I can't find it.

Thank you very much,
Tobi
Posted 06 Jan, 2010 12:01:54 Top
Andrei Smolin


Add-in Express team


Posts: 17132
Joined: 2006-05-11
Hi Tobi,

In fact, you need to check if HostVersion returns a correct PowerPoint version and get/set/call appropriate properties/methods via late binding, ie. using System.Type.InvokeMember.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Jan, 2010 12:13:09 Top
Tobias Böhm




Posts: 73
Joined: 2009-07-06
Nice,
but you don't by any chance happen to have a proper example for using late binding in your assemblies. You are much more expierienced with this and I don't want do make some stupid mistake.

I'm trying something like this


            Type t = PowerPointSlide.GetType();
            object o = t.InvokeMember("Name", BindingFlags.GetProperty, null, PowerPointApp, null);


it works but Name is a property included in the version-neutral assembly so that's no surprise. If I try


            Type t = PowerPointSlide.GetType();
            object o = t.InvokeMember("Comments", BindingFlags.GetProperty, null, PowerPointApp, null);

it fails with an "Unknown name" COM-Exception even though the current PP-version (2007) has the property "Comments".

Please be so kind as to push me in the right direction.

Thanks,
Tobias
Posted 07 Jan, 2010 12:36:01 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Tobias,

Please try searching our forum with late binding as keywords. I am sure you will find the answer.
.NET, Extended MAPI, Windows Phone & RT
Posted 08 Jan, 2010 10:29:27 Top
Andrei Smolin


Add-in Express team


Posts: 17132
Joined: 2006-05-11
Hi Tobi,

I've checked the object model of PP2007, the Comments property is available for PowerPoint.Slide and PowerPoint.SlideRange, not for PowerPoint.Application.

            Type t = PowerPointSlide.GetType(); 
            object o = t.InvokeMember("Comments", BindingFlags.GetProperty, null, PowerPointSlide, null); 


Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 08 Jan, 2010 11:01:37 Top
Tobias Böhm




Posts: 73
Joined: 2009-07-06
Of course that was totally my mistake. Seems like I haven't been paying attention there.
Now it works perfectly. Thanks you very much guys.

One more question tough:
I guess that the version neutral assembly, for say Powerpoint, has the functionality that all PP versions support. So the "Comments" property seems to be introduced lately. How can the type "Slide" from this version neutral assembly then invoke a method which is defined in the Powerpoint 2007-assembly?

Tobias
Posted 09 Jan, 2010 08:38:12 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Tobias,

Please have a look at the following article. And that one. I hope you will find the answer there.
.NET, Extended MAPI, Windows Phone & RT
Posted 10 Jan, 2010 05:07:11 Top