How to hide a predefined set of slides using a macro?

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

Guest

I have one huge ppt-file that I would like to use in several different
configurations. It is always updated, and rather than having to hide the same
slides time after time, I would like to have several 'configurations', for
instance one short version, one medium length version and one full version.
Then I wish to be able to switch between these via an macro that hides or
shows a subset of all the slides in the same presentation.
How do I do this? I do know OOP, but have never bothered to learn VB.
 
The easiest thing to do is to create custom shows. You can create a custom
show for each different configuration and have a menu slide that hyperlinks
to the custom shows. VBA can work for this, but it is not necessary.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

=?Utf-8?B?Q2hyaXN0b3BoZXIgR3JpbmRl?= <Christopher
(e-mail address removed)> wrote in
 
Rather than resorting to VB, why don't you create 3 custom shows with a menu
slide to launch the appropriate one?
 
Hi Christopher

This is exactly what Custom Shows are for - set up as many as you want then
have a link to each from a 'front page' slide. You should find all the info
you need on creating custom shows here:
http://office.microsoft.com/en-au/powerpoint/HP051928141033.aspx?pid=CH063500731033
If not, post back (with your version) and I'll go into more detail.

Lucy
--
MOS Master Instructor
www.aneasiertomorrow.com.au

If this post answered your question please let us know as others may be
interested too
 
I'm sure I replied to this this morning but nothing's showing up...

Hi Christopher

You don't need VBA, just Custom Shows and a 'front page' slide with links to
launch the one you need. See here for how to set them up:
http://office.microsoft.com/en-us/powerpoint/CH063500731033.aspx

If you need more info post back with which version you use.

Lucy
--
MOS Master Instructor
www.aneasiertomorrow.com.au

If this post answered your question please let us know as others may be
interested too
 
You can make use of custom shows to do that rather than VB.

For instance, click Slide Show > Custom Shows. Click New. Set a new name for
custom show 1 (e.g. Short Version). Add the slides that you want to display
during slide show. Once you are done, click ok.

Now, add a menu slide.
Add an action button that hyperlinks to the custom show 1.
Have it show and return.
Repeat the steps for medium and full version.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

Site Updated: May 19, 2007
9 new PowerPoint Artworks
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate
 
Sorry not a detailed answer but if it was me, I'd head this way.

Have Slide 1 as your Admin/Menu slide, say containing 2 buttons
Short/Med/Long which runs the macro then advances to first slide (i.e. next
slide)

Sounds like you are planning to have fixed slides each time, so could
hardcode the slide numbers in an Array for each subset required.

Then iterate through each slide checking against the array if false then
hide the slide.

Probably best to reset (un-hide) all slides each time you run the pres.

Easiest way to get a handle on where powerpoint hides things in its object
model is to record a macro manually. Then Alt-F11 and pick out the fragments
you want.

Kyle.
 
My solution to your problem:

Place a named "Marker" on each slide.
Then Show/Hide depending if the marker is on a slide.
You can change the slides continuously and keep the versions upto date without worrying about changing page numbers.

Private Sub Button_Engineering_Click()
Dim Show_Slide As Boolean
Dim oSl As Slide
Dim oSh As Shape

Show_Slide = False
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If oSh.Name = "Engineers" Then Show_Slide = True
Next
If Show_Slide = True Then oSl.SlideShowTransition.Hidden = False
If Show_Slide = False Then oSl.SlideShowTransition.Hidden = True
Show_Slide = False

Next
End Sub

Private Sub Button_Mgmt_Click()
Dim Show_Slide As Boolean
Dim oSl As Slide
Dim oSh As Shape

Show_Slide = False
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If oSh.Name = "Mgmt" Then Show_Slide = True
Next
If Show_Slide = True Then oSl.SlideShowTransition.Hidden = False
If Show_Slide = False Then oSl.SlideShowTransition.Hidden = True
Show_Slide = False

Next
End Sub

Private Sub Button_Show_All_Click()
Dim oSl As Slide
Dim oSh As Shape
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
oSl.SlideShowTransition.Hidden = False
Next
Next
End Sub

I have one huge ppt-file that I would like to use in several different
configurations. It is always updated, and rather than having to hide the same
slides time after time, I would like to have several 'configurations', for
instance one short version, one medium length version and one full version.
Then I wish to be able to switch between these via an macro that hides or
shows a subset of all the slides in the same presentation.
How do I do this? I do know OOP, but have never bothered to learn VB.
On Tuesday, June 05, 2007 3:40 PM David M. Marcovitz wrote:
The easiest thing to do is to create custom shows. You can create a custom
show for each different configuration and have a menu slide that hyperlinks
to the custom shows. VBA can work for this, but it is not necessary.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

=?Utf-8?B?Q2hyaXN0b3BoZXIgR3JpbmRl?= <Christopher
(e-mail address removed)> wrote in
news:[email protected]:
On Wednesday, June 06, 2007 12:08 AM pptheaven[AT]gmail[DOT]com wrote:
You can make use of custom shows to do that rather than VB.

For instance, click Slide Show > Custom Shows. Click New. Set a new name for
custom show 1 (e.g. Short Version). Add the slides that you want to display
during slide show. Once you are done, click ok.

Now, add a menu slide.
Add an action button that hyperlinks to the custom show 1.
Have it show and return.
Repeat the steps for medium and full version.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

Site Updated: May 19, 2007
9 new PowerPoint Artworks
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate


"Christopher Grinde" wrote:
 
Back
Top