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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|