Scale Effect not working properly in powerpoint 2003!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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
 
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.
 
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
 
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)
 
Hi Shyam
Its still works the same way
Any other way

Eagerly waiting for your valuable comment

regards
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
 
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.


Try the ActivePresentation.Saved property


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
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
 
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.

The act of creating a presentation is in itself a change, so the property isn't really giving
a false reading, I suppose. But I see the problem. You need to filter out the situation
where someone starts a new presentation then, in effect, cancels.

I don't know what else your code's doing, but if you were to force a save immediately after
creating a new presentation, before the user's had any chance to change anything, that'd set
.Saved to true. If the user later quits w/o changing anything, you could simply delete the
file.

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
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
 
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.

Good; same as what I had in mind said:
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.

We'll need to wait for Shyam to answer that one, I expect.
I don't know.


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
Back
Top