PDA

View Full Version : [SOLVED:] Filter Slides for Sales Presentations



Cirrus
02-28-2008, 02:01 PM
Let me begin with my ultimate question and then provide some background:
How do you apply a tag to multiple slides?

and now some background:

I work at a computer engineering firm in the marketing department. We use powerpoint to create sales presentations for various departments in the company. Specifically in my sector we use 4 specific types of Sales Presentations (Divisional, Application, Product Line, and New Product).

Basically, my boss wants to compile a master slide show that can filter slides based on those 4 criteria.


activepresentation.Slides(2).Tags.Add "Marketing", "Divisional"
activepresentation.Slides(3).Tags.Add "Marketing", "Application"
activepresentation.Slides(4).Tags.Add "Marketing", "Product Line"
activepresentation.Slides(5).Tags.Add "Marketing", "New Product"
My solution was to use tags to designate each slide into one of the 4 categories. Then, I hid all the slides. A UserForm then pops up which allows you to check which slide set you want to see based on their tags.


Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "Divisional" Then
s.SlideShowTransition.Hidden = msoFalse
End If
Next
End If
If CheckBox1.Value = False Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "Divisional" Then
s.SlideShowTransition.Hidden = msoTrue
End If
Next
End If
End Sub

Private Sub CheckBox2_Click()
If CheckBox2.Value = True Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "Application" Then
s.SlideShowTransition.Hidden = msoFalse
End If
Next
End If
If CheckBox2.Value = False Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "Application" Then
s.SlideShowTransition.Hidden = msoTrue
End If
Next
End If
End Sub

Private Sub CheckBox3_Click()
If CheckBox3.Value = True Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "Product Line" Then
s.SlideShowTransition.Hidden = msoFalse
End If
Next
End If
If CheckBox3.Value = False Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "Product Line" Then
s.SlideShowTransition.Hidden = msoTrue
End If
Next
End If
End Sub

Private Sub CheckBox4_Click()
If CheckBox4.Value = True Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "New Product" Then
s.SlideShowTransition.Hidden = msoFalse
End If
Next
End If
If CheckBox4.Value = False Then
For Each s In activepresentation.Slides
If s.Tags("marketing") = "New Product" Then
s.SlideShowTransition.Hidden = msoTrue
End If
Next
End If
End Sub

Private Sub CommandButton1_Click()
With activepresentation.SlideShowSettings.Run.View
End With
End Sub

This solution works well for a few slides but I will soon be working with over 100 slides and will need to tag multiple slides with the same tags. How can I do this efficiently?

gwkenny
02-29-2008, 09:39 PM
Is there a reason to have the information organized in this manner? In every presentation, you are going to have 3 other "hidden" presentations. Leads to rather large files.

Seems more logical to break them down into the 4 specific presentations and use those as the base to add / delete slides.

If you cannot dictate the structure and you have to continue as you are... You can put several of your 'criteria' in the tag. ie: Application/New Product. Then use INSTR to determine if your 'criteria' is in your tag.

John Wilson
03-01-2008, 05:46 AM
Ctrl click to select multiple slides and

Sub addtags()
Dim osld As Slide
For Each osld In ActiveWindow.Selection.SlideRange
osld.Tags.Add "name", "Value"
Next
End Sub

Cirrus
03-03-2008, 01:01 PM
I agree that it is quite clumsy but it's what he wants. Thanks for the help. The code worked great and now I have a fully functional, filtered (albeit massive!) presentation. :thumb

Cirrus
03-06-2008, 02:43 PM
Well, the code works great but now I can't view those slides when I run the slideshow. Any idea why?

John Wilson
03-06-2008, 11:29 PM
Adding tags can't cause slides not to show so you will need to look elsewhere for the solution

Could the slides be marked hidden?
Could they have an auto transition?
In set up show is "Show All" ticked?

Cirrus
03-07-2008, 12:21 PM
Doh!:doh:
Somehow, it was only setup to show the 1st 5 slides. When I told it to show all slides it worked. I have no idea when I told it to only show the 1st 5 slides but whatever, it all works now! thanks again for all of your help!

John Wilson
03-08-2008, 08:44 AM
That's good! Glad to help

John