Scale Effect not working properly in powerpoint 2003!

A

Anand

Hi
I am trying to scale an object using following code.But whatever be the values of byx and byy Scaling effect is from 100 to 0.What is the problem. MS site doesn't provide enough infromation


eff.Timing.Speed =
Dim behav As AnimationBehavio
behav = eff.Behaviors.Add(MsoAnimType.msoAnimTypeScale
With behav.ScaleEffec
.ByX = 20
.ByY = 20
End Wit

Last time i got solution in this discussion room hoping for the same this time too
Please help

Regards
Anand
 
S

Shyam Pillai

Anand,
If you don't post follow-up information that has been requested, you cannot
expect answers. Please refer to your original post for the information that
I asked in order to help you.

--
Regards
Shyam Pillai

http://www.mvps.org/skp

Anand said:
Hi!
I am trying to scale an object using following code.But whatever be the
values of byx and byy Scaling effect is from 100 to 0.What is the problem.
MS site doesn't provide enough infromation.
 
C

Chirag

You seem to be forgetting the "Set" keyword while assigning the value to "behav" variable. The line should read as

Set behav = eff.Behaviors.Add(MsoAnimType.msoAnimTypeScale

- Chira

PowerShow - View multiple shows simultaneousl
http://officeone.mvps.org/powershow/powershow.htm


----- Anand wrote: ----

Hi
I am trying to scale an object using following code.But whatever be the values of byx and byy Scaling effect is from 100 to 0.What is the problem. MS site doesn't provide enough infromation


eff.Timing.Speed =
Dim behav As AnimationBehavio
behav = eff.Behaviors.Add(MsoAnimType.msoAnimTypeScale
With behav.ScaleEffec
.ByX = 20
.ByY = 20
End Wit


Last time i got solution in this discussion room hoping for the same this time too
Please help

Regards
Anand
 
S

Shyam Pillai

I think he is writing VB.Net or C# code where Set would not be required.
However Anand needs to provide more information.

--
Regards
Shyam Pillai

http://www.mvps.org/skp

Chirag said:
You seem to be forgetting the "Set" keyword while assigning the value to
"behav" variable. The line should read as:
Set behav = eff.Behaviors.Add(MsoAnimType.msoAnimTypeScale)

- Chirag

PowerShow - View multiple shows simultaneously
http://officeone.mvps.org/powershow/powershow.html


----- Anand wrote: -----

Hi!
I am trying to scale an object using following code.But whatever be
the values of byx and byy Scaling effect is from 100 to 0.What is the
problem. MS site doesn't provide enough infromation.
 
A

Anand

Hi shyam

Yes it's in vb.net.This is the complete procedure.Similar procedure is working if i use From & To proerties of scaleeffect

Private Overloads Sub prcScale(ByVal SByX As Single, ByVal SByY As Single, ByVal SSpeed As Single, ByVal STriggerType As TriggerType
Tr

Dim sh As Shap
Dim eff As Effec
sh = m_objPpt.ActiveWindow.Selection.ShapeRange.Item(1
eff = m_objPpt.ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect(sh, PowerPoint.MsoAnimEffect.msoAnimEffectCustom
If STriggerType = TriggerType.WithPrevious The
eff.Timing.TriggerType = MsoAnimTriggerType.msoAnimTriggerWithPreviou
ElseIf STriggerType = TriggerType.AfterPrevious The
eff.Timing.TriggerType = MsoAnimTriggerType.msoAnimTriggerAfterPreviou
End I
eff.Timing.Speed = SSpee
Dim behav As AnimationBehavio
behav = eff.Behaviors.Add(MsoAnimType.msoAnimTypeScale
With behav.ScaleEffec
.ByX = SBy
.ByY = SBy
End Wit

Catch ex As Exceptio
End Tr
End Su

Thanks for your keen interest

Regards
Anand
 
S

Shyam Pillai

Anand,
Use msoAnimEffectGrowShrink instead of msoAnimEffectGrowCustom. When you add
a scale effect the ToX, ToY properties get assigned the value 1 which takes
precedence over the ByX, ByY values.

eff = ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect(sh,
PowerPoint.MsoAnimEffect.msoAnimEffectGrowShrink)
Dim behav As AnimationBehavior
behav = eff.Behaviors(1)
With behav.ScaleEffect
.ByX = 200
.ByY = 200
End With

--
Regards
Shyam Pillai
--
Toolbox: http://www.mvps.org/skp/toolbox/

Anand said:
Hi shyam,

Yes it's in vb.net.This is the complete procedure.Similar procedure is
working if i use From & To proerties of scaleeffect.
Private Overloads Sub prcScale(ByVal SByX As Single, ByVal SByY As Single,
ByVal SSpeed As Single, ByVal STriggerType As TriggerType)
 
A

Anand

Hi Shyam
Its still works the same way
Any other way

Eagerly waiting for your valuable comment

regards
Anand
 
S

Shyam Pillai

It works if you use it in the manner I've suggested. Are you seeing
otherwise?
 
A

Anand

hi Shyam

Its still not working
But now I am doing it using fromX ,FromY set to 100 and ToX ,ToY to desired value. Its Working

Another thing, how can we find if a new presentation file is changed or not since it is opened
In Word the condition document.save =false means the document is not changed in case of new document or existing one .But its not so in PowerPoint in case of new presentation file and works same as word for existing file

Please take interest as you always do

regards
Anand
 
A

Anand

Hi steve
Yes, I am using ActivePresentation.Saved property.It works in case if a existing file is opened.But if a new file is opened and then closed without making any changes ActivePresentation.Saved becomes False.So through this property I am unable to detect whether a new presentation file is changed or not

Regards
Anand
 
A

Anand

hi Steve

Thanks for you keen interest

I got the solution for that
Whenever I am opening a new presentation its I make its saved property true
So if changes are not made then saved property remains true.But if changes are made PowerPoint itself makes it false

---------------------------------
Another problem
when we apply ScaleEffect (or motioneffect or rotationEffect),the behavior is specified through (From,To) or BY parametrs of behavior object
Can I find which parametrs ( From,To ) or By are used in an existing behavior

regards
Anand
 

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