A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Powerpoint VBA Code for 'Is Shape Displayed?'



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2007, 12:31 PM posted to microsoft.public.powerpoint
Ian47
external usenet poster
 
Posts: 12
Default Powerpoint VBA Code for 'Is Shape Displayed?'

Hello,

I am trying to generate some VBA Macro code to determine if a particular
shape / text box etc is visable on screen during a slideshow.

I have been able to do this if the shape's .visible property is set to false
or true by code itself:

Example:

Dim ShapeVisible As Boolean

ActivePresentation.Slides(2).Shapes.Item("Rectangl e 123").Visible = msoFalse

ShapeVisible = ActivePresentation.Slides(2).Shapes.Item("Rectangl e
123").Visible = msoFalse

If ShapeVisible Then

......... Rest of Code

EndIf


However, what I really need to do now is determine if a shape which has been
set to appear / disappear by custom animation is 'on screen'(after appear) or
'off screen' (after Disappear).

Is this possible, as the shape's .visible property always seems to be 'True'
irrespective of the Appear / Disappear animation?

Thanks for you help,

Ian
  #2  
Old March 4th, 2007, 02:08 PM posted to microsoft.public.powerpoint
Shyam Pillai
external usenet poster
 
Posts: 622
Default Powerpoint VBA Code for 'Is Shape Displayed?'

Hello Ian,
The visible property is not related to the animation properties. It's a
state of the shape when not animated.
To determine the current *animated* state one needs to read the animation
information and then keep track of the animation timeline. Not a trivial
task but it can be done with some amount of the code and some event handling
to keep track of the animations that have fired. Let me know if you need
more information.


--
Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm



"Ian47" wrote in message
...
Hello,

I am trying to generate some VBA Macro code to determine if a particular
shape / text box etc is visable on screen during a slideshow.

I have been able to do this if the shape's .visible property is set to
false
or true by code itself:

Example:

Dim ShapeVisible As Boolean

ActivePresentation.Slides(2).Shapes.Item("Rectangl e 123").Visible =
msoFalse

ShapeVisible = ActivePresentation.Slides(2).Shapes.Item("Rectangl e
123").Visible = msoFalse

If ShapeVisible Then

........ Rest of Code

EndIf


However, what I really need to do now is determine if a shape which has
been
set to appear / disappear by custom animation is 'on screen'(after appear)
or
'off screen' (after Disappear).

Is this possible, as the shape's .visible property always seems to be
'True'
irrespective of the Appear / Disappear animation?

Thanks for you help,

Ian


  #3  
Old March 4th, 2007, 02:34 PM posted to microsoft.public.powerpoint
Ian47
external usenet poster
 
Posts: 12
Default Powerpoint VBA Code for 'Is Shape Displayed?'

Shyam,

Thank you for your quick response. Your suggestion sounds exactly like the
route I need to take! Without wishing to take up too much of your time, have
you got any pointers on where to go for further information on how to
proceed.

I obviously have access to the Powerpoint VBA Help files which has some
information on Event Handling. Any advice on tracking the timeline and
animations triggered by mouse clicks would be very useful.

Thanks again

Ian

"Shyam Pillai" wrote:

Hello Ian,
The visible property is not related to the animation properties. It's a
state of the shape when not animated.
To determine the current *animated* state one needs to read the animation
information and then keep track of the animation timeline. Not a trivial
task but it can be done with some amount of the code and some event handling
to keep track of the animations that have fired. Let me know if you need
more information.


--
Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm



"Ian47" wrote in message
...
Hello,

I am trying to generate some VBA Macro code to determine if a particular
shape / text box etc is visable on screen during a slideshow.

I have been able to do this if the shape's .visible property is set to
false
or true by code itself:

Example:

Dim ShapeVisible As Boolean

ActivePresentation.Slides(2).Shapes.Item("Rectangl e 123").Visible =
msoFalse

ShapeVisible = ActivePresentation.Slides(2).Shapes.Item("Rectangl e
123").Visible = msoFalse

If ShapeVisible Then

........ Rest of Code

EndIf


However, what I really need to do now is determine if a shape which has
been
set to appear / disappear by custom animation is 'on screen'(after appear)
or
'off screen' (after Disappear).

Is this possible, as the shape's .visible property always seems to be
'True'
irrespective of the Appear / Disappear animation?

Thanks for you help,

Ian


  #4  
Old March 4th, 2007, 02:59 PM posted to microsoft.public.powerpoint
Shyam Pillai
external usenet poster
 
Posts: 622
Default Powerpoint VBA Code for 'Is Shape Displayed?'

Ian,
Head to this page: Timeline – The animation engine in PowerPoint -
http://skp.mvps.org/ppttimeline1.htm. This explains how to read animation
information in PPT 2002/2003/2007.

By trapping events of SlideShowNextBuild (available PPT 2003/2007),
SlideShowNextClick. You should be able to keep track of where the user is in
a given slide.

Get back if you have any further questions.

--
Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm



"Ian47" wrote in message
...
Shyam,

Thank you for your quick response. Your suggestion sounds exactly like
the
route I need to take! Without wishing to take up too much of your time,
have
you got any pointers on where to go for further information on how to
proceed.

I obviously have access to the Powerpoint VBA Help files which has some
information on Event Handling. Any advice on tracking the timeline and
animations triggered by mouse clicks would be very useful.

Thanks again

Ian

"Shyam Pillai" wrote:

Hello Ian,
The visible property is not related to the animation properties. It's a
state of the shape when not animated.
To determine the current *animated* state one needs to read the animation
information and then keep track of the animation timeline. Not a trivial
task but it can be done with some amount of the code and some event
handling
to keep track of the animations that have fired. Let me know if you need
more information.


--
Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm



"Ian47" wrote in message
...
Hello,

I am trying to generate some VBA Macro code to determine if a
particular
shape / text box etc is visable on screen during a slideshow.

I have been able to do this if the shape's .visible property is set to
false
or true by code itself:

Example:

Dim ShapeVisible As Boolean

ActivePresentation.Slides(2).Shapes.Item("Rectangl e 123").Visible =
msoFalse

ShapeVisible = ActivePresentation.Slides(2).Shapes.Item("Rectangl e
123").Visible = msoFalse

If ShapeVisible Then

........ Rest of Code

EndIf


However, what I really need to do now is determine if a shape which has
been
set to appear / disappear by custom animation is 'on screen'(after
appear)
or
'off screen' (after Disappear).

Is this possible, as the shape's .visible property always seems to be
'True'
irrespective of the Appear / Disappear animation?

Thanks for you help,

Ian



  #5  
Old March 7th, 2007, 02:54 AM posted to microsoft.public.powerpoint
Ian47
external usenet poster
 
Posts: 12
Default Powerpoint VBA Code for 'Is Shape Displayed?'

Shyam,

Thank you for your help. Problem now solved by trapping SlideShowNextBuild
Events, and counting them.

Code now does exactly as I needed it to

Ian

"Shyam Pillai" wrote:

Ian,
Head to this page: Timeline – The animation engine in PowerPoint -
http://skp.mvps.org/ppttimeline1.htm. This explains how to read animation
information in PPT 2002/2003/2007.

By trapping events of SlideShowNextBuild (available PPT 2003/2007),
SlideShowNextClick. You should be able to keep track of where the user is in
a given slide.

Get back if you have any further questions.

--
Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm



"Ian47" wrote in message
...
Shyam,

Thank you for your quick response. Your suggestion sounds exactly like
the
route I need to take! Without wishing to take up too much of your time,
have
you got any pointers on where to go for further information on how to
proceed.

I obviously have access to the Powerpoint VBA Help files which has some
information on Event Handling. Any advice on tracking the timeline and
animations triggered by mouse clicks would be very useful.

Thanks again

Ian

"Shyam Pillai" wrote:

Hello Ian,
The visible property is not related to the animation properties. It's a
state of the shape when not animated.
To determine the current *animated* state one needs to read the animation
information and then keep track of the animation timeline. Not a trivial
task but it can be done with some amount of the code and some event
handling
to keep track of the animations that have fired. Let me know if you need
more information.


--
Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm



"Ian47" wrote in message
...
Hello,

I am trying to generate some VBA Macro code to determine if a
particular
shape / text box etc is visable on screen during a slideshow.

I have been able to do this if the shape's .visible property is set to
false
or true by code itself:

Example:

Dim ShapeVisible As Boolean

ActivePresentation.Slides(2).Shapes.Item("Rectangl e 123").Visible =
msoFalse

ShapeVisible = ActivePresentation.Slides(2).Shapes.Item("Rectangl e
123").Visible = msoFalse

If ShapeVisible Then

........ Rest of Code

EndIf


However, what I really need to do now is determine if a shape which has
been
set to appear / disappear by custom animation is 'on screen'(after
appear)
or
'off screen' (after Disappear).

Is this possible, as the shape's .visible property always seems to be
'True'
irrespective of the Appear / Disappear animation?

Thanks for you help,

Ian


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.