Ideally I would like to start with a list of presentations (initially
10-20 but possible much greater ... around 100) and then have an
output that would list the slide title, the number of occurances and
perhaps the file name. The output would be sorted by declining number
number of occurances.
The first filter would be the slide title with a second filter being
the PPT 03 "Compare and merge presentations".
Does anyone have an idea how to do this?
(This function could also be used to seek and delete out-of-date
material. i.e. put in a slide title and get a list of files with the
slide.)
All or some of this can be done, but it takes a LOT of coding.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
<g>
OK, then let's assume that rolling your own is out.
There are several slide library programs at various price points with different
levels of capability. Try googling "Presentation Librarian" and "SlideWhere"
for starters.
If you standardize on Office 2007 and can afford a SharePoint setup with
Microsoft Office SharePoint Services (MOSS) that might be another solution. I
can't foot the bill so don't have direct experience, but as I understand it, it
allows users to create presentations by selecting slides from a central slide
repository and can notify them when a slide has been updated.
Kathy Jacobs knows a great deal more about this. Yo. Kathy! Yo!
OK I can find someone to help me but I need to give them some
direction.
How do you read PPT slide titles from 'outside' the file?
There are lots of examples and links to other examples in the programming
section of the PPT FAQ
http://www.pptfaq.com/
Also see the VB/PPA FAQ at http://skp.mvps.org
(I'm only giving the link to the main page because you really will want to look
over the whole site)
Some examples on the PPT FAQ that'll be relevant:
Export Slide Number and Title Text to a text file
http://www.pptfaq.com/FAQ00332.htm
Batch: Do something to every file in a folder
http://www.pptfaq.com/FAQ00536.htm
Thanks
Looking at the code on PPTools it strikes me that I could modify "Show
me the .type of each object on a slide" to "Count .type of each
object on a slide".
I have a distinct feeling that this is walking before running!
There, that wasn't so bad, was it? Nice going!
> Looking at the code on PPTools it strikes me that I could modify "Show
> me the .type of each object on a slide" to "Count .type of each
> object on a slide".
It shouldn't be too hard. Something like:
Dim Type1Count as Long
Dim Type2Count as long
..
etc
Dim TypeUnknown as Long
One you have a reference to the shape (example, in a varable named oSh)
Select Case oSh.Type
Case Is = 1
Type1Count = Type1Count + 1
Case is = 2
Type2Count = Type2Count + 1
'... etc
Case Else
TypeUnknownCount = TypeUnknownCount + 1
End Select
I'm sure there are more elegant ways of doing the job with less typing, but
this is simple to understand and update.
I managed to get this far but I don't know what I am doing (That's
being honest!). There is still has a problem around the "Select Case
oSh.Type". Hence my suspicions above.
Does the Dim statement automatically set the Type0XCount to zero?
Sub Count_Object_Types_on_This_Slide()
'Refers to each object on the current page and returns the number
of each Shapes.Type
Dim Type01Count As Long
Dim Type02Count As Long
Dim Type03Count As Long
Dim Type04Count As Long
Dim Type05Count As Long
Dim Type06Count As Long
Dim Type07Count As Long
Dim Type08Count As Long
Dim Type09Count As Long
Dim Type10Count As Long
Dim Type11Count As Long
Dim Type12Count As Long
Dim Type13Count As Long
Dim Type14Count As Long
Dim Type15Count As Long
Dim Type16Count As Long
Dim Type17Count As Long
Dim Type18Count As Long
Dim Type19Count As Long
Dim Type20Count As Long
Dim TypeUnknown As Long
For i = 1 To ActiveWindow.Selection.SlideRange.Shapes.Count
'Once you have a reference to the shape (example, in a variable named
oSh)
With ActiveWindow.Selection.SlideRange.Shapes(i)
ActiveWindow.Selection.SlideRange.Shapes(i).Select
Select Case oSh.Type
Case Is = 1
'an AutoShape
Type01Count = Type01Count + 1
Case Is = 2
'a Callout
Type02Count = Type02Count + 1
Case Is = 3
'a Chart
Type03Count = Type03Count + 1
Case Is = 4
'a Comment
Type04Count = Type04Count + 1
Case Is = 5
'a Freeform
Type05Count = Type05Count + 1
Case Is = 6
'a Group
Type06Count = Type06Count + 1
Case Is = 7
'an Embedded OLE Object
Type07Count = Type07Count + 1
Case Is = 8
'a Form Control
Type08Count = Type08Count + 1
Case Is = 9
'a Line
Type09Count = Type09Count + 1
Case Is = 10
'a Linked OLE Object
Type10Count = Type10Count + 1
Case Is = 11
'a Linked Picture
Type11Count = Type11Count + 1
Case Is = 12
'an OLE Control Object
Type12Count = Type12Count + 1
Case Is = 13
'a embedded picture
Type13Count = Type13Count + 1
Case Is = 14
'a text placeholder (title or regular text--not a standard
textbox)object
Type14Count = Type14Count + 1
Case Is = 15
'a WordArt (Text Effect)
Type15Count = Type15Count + 1
Case Is = 16
'a Media object .. sound, etc.
Type16Count = Type16Count + 1
Case Is = 17
'a Text Box
Type17Count = Type17Count + 1
Case Is = 18
'a ScriptAnchor
Type18Count = Type18Count + 1
Case Is = 19
'a Table
Type19Count = Type19Count + 1
Case Is = 20
'a Mixed object (whatever that might be)
Type20Count = Type20Count + 1
Case Else
'a mystery!!! ?An undocumented object type?
TypeUnknownCount = TypeUnknownCount + 1
End Select
MsgBox ("some message here")
End With
Next i
End Sub
Yep, but I wasn't certain what the rest of your code looked like.
Thanks for copying it in here.
You were only a hair's breadth away. See the minor changes below.
>
> I managed to get this far but I don't know what I am doing (That's
> being honest!). There is still has a problem around the "Select Case
> oSh.Type". Hence my suspicions above.
>
> Does the Dim statement automatically set the Type0XCount to zero?
Yes.
With ActiveWindow.Selection.SlideRange.Shapes(i)
' Delete the following line. Never select anything unless you absolutely must.
' ActiveWindow.Selection.SlideRange.Shapes(i).Select
' And instead of this:
' Select Case oSh.Type
' use this:
Select Case .Type
-----------------------------------------
I only have a message box output right now but will integrate this
into my filename, slide_title and slide_number routine.
Rather than use the 'compare presentation' option in PPT I will use
the number of objects by type as a way to segregate slides that have
the same title.
MANY MANY THANKS (am I allowed to shout a bit?)
Now I have to get serious about VB!
Louder. LOUDER. ***LOUDER!!!!***
Shouts of gratitude are our paycheck here.
Bellow. <g>
Now I have to build a slide library!
<G>
There are quite a few products ready-built for this, btw.