Jump to content

PowerPoint


Bam
 Share

Recommended Posts

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
Link to comment
Share on other sites

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!"

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...