Jump to content
Sign in to follow this  
Bam

PowerPoint

Recommended Posts

Bam

Hello I was wounder if their was a way to add a Custom Animation to a picture in PowerPoint using COM.

If you can, where can I go to learn how?

I came acrost this http://www.autoitscript.com/forum/index.php?showtopic=50254&st=0&p=702821&hl=powerpoint&fromsearch=1&#entry702821

and it has been very help full so far but im not sure how he found the COM (I think thats what .Shapes.AddPicture thing is refered too)

As you can tell I have never worked with COM befor, read alittle bit in the AutoIt Help any help/info would be appreciated.

Edit:

I did find this http://msdn.microsoft.com/en-us/library/aa140998(office.10).aspx

.ApplyTemplate FileName:="c:\program files\microsoft office\" _

& "templates\presentation designs\fireball.pot"

But I have not been able to get it to work.

Edit:

Found this also http://msdn.microsoft.com/en-us/library/bb265695.aspx

With ActivePresentation.Slides(2).Shapes(1).AnimationSettings

.EntryEffect = ppEffectFlyFromLeft

.TextLevelEffect = ppAnimateByAllLevels

End With

I tried doing

$objectSlide1 = _PPT_SlideCreate($objPres, 1, $PPLAYOURBLANK)

$objectSlide1.Shapes.AddPicture("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hill.jpg, 0, 1, 0, 50, 720, 439)

$objectSlide1.Shapes.AnimationSettings.EntryEffect("ppEffectFlyFromLeft")

But it gets an error at .EntryEffect

Edited by Bam

Share this post


Link to post
Share on other sites
Bam

Bump.

Am I on the right track? Do I just need to learn some visual basic to learn how to convert it to AutoIt?

Share this post


Link to post
Share on other sites
Bam

Bump.

I never had to bump a thread befor and now this is the 2nd time :)

Share this post


Link to post
Share on other sites
GEOSoft

without looking into the power point com object I would suspect that

$objectSlide1.Shapes.AnimationSettings.EntryEffect("ppEffectFlyFromLeft")

should probably be

$objectSlide1.Shapes.AnimationSettings.EntryEffect = ("ppEffectFlyFromLeft")

Like I said, that's without looking at the actual com object though.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
PsaltyDS

without looking into the power point com object I would suspect that

$objectSlide1.Shapes.AnimationSettings.EntryEffect("ppEffectFlyFromLeft")

should probably be

$objectSlide1.Shapes.AnimationSettings.EntryEffect = ("ppEffectFlyFromLeft")

Like I said, that's without looking at the actual com object though.

Close, it's a PowerPoint constant value and should be:
Global Const $ppEffectFlyFromLeft = 3329

$objectSlide1.Shapes.AnimationSettings.EntryEffect = $ppEffectFlyFromLeft

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Bam

Thanks for the help :)

Takes only 2 minutes with this and about 3 hours the other way ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×