Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Automatically Sort a list of slides in one file

828 views
Skip to first unread message

Jim and Marcy Connett / J & M International

unread,
Jun 5, 1999, 3:00:00 AM6/5/99
to
I've asked this question before, I'll ask it until I get an answer that I
can use...surely someone has to know.

I have 900 slides in one file that are titled. As I add new slides (to the
bottom of the list by default), I manually alphabetize the slides by title.
I'd like to know of how I could sort the list automatically. I'm studying
VB5 right now. Is there anything else I can look for or at on the web that
might help me?

Thx...yet again!
--Jim


PK Huntzinger

unread,
Jun 5, 1999, 3:00:00 AM6/5/99
to
Jim,

Keep asking <g> I've been puzzling it out, but I'm not as good with this vba
stuff as I'd like to be. Let me put out what my ideas are and perhaps
someone can tell me if this is the way to do it or if there is an easier
way.

first you have to get a list of the titles; you also need to know which
slide the title is attached to and for this you want the slide ID, not the
slide number (which changes when the slide is moved)

go from 1 to howevermanyslides
get the slide ID, title
put these in a temporary spot, my guess would be an array
sort by the title
then assign the slide number to the list in the sorted order

I don't quite understand arrays, so that's where I'm stumped right now.
any and all ideas are welcome, especially if I'm going about this the wrong
way <g>

btw, this is sorta kinda how you'd do the random order slide show that
someone asked about this weekend. you don't sort them, you'd randomize the
numbers and then order them randomly, making sure not to duplicate. hmm...
if you use slide ID and not slide number you wouldn't have dupes, would you?

Kathy

H.E.Weenink

unread,
Jun 6, 1999, 3:00:00 AM6/6/99
to
You might try this on. It will not go fast, but it will go.(At least it did on
my computer:-)
-------------------------
Sub 900Sort()
'
' This macro is made by Eef Weenink 05-06-99
'
Dim title1, title2 As String
Dim s1, s2 As Object
Dim c, s, m As Integer
Dim NoSlideMoved As Boolean
'Set activwindow in slidesorterview otherwise the cut and
'paste does not work
ActiveWindow.ViewType = ppViewSlideSorter
'Skip on all errors
On Error Resume Next

slidemoved = True
'Loop next part s long as needed (takes a very long time!)
While slidemoved = True
slidemoved = False
'Check all slides
For s = 1 To (ActivePresentation.Slides.Count) - 1
'Pick up title from first slide
Set s1 = ActivePresentation.Slides(s)
title1 = s1.Shapes.Title.TextFrame.TextRange.Text
'Pick up title from second slide
Set s2 = ActivePresentation.Slides(s + 1)
title2 = s2.Shapes.Title.TextFrame.TextRange.Text
'compare titles
c = StrComp(title1, title2, vbTextCompare)
'If title2 is lower (in alfabet) slide1 is moved before slide2
If c = 1 Then
s1.Cut
ActiveWindow.View.GotoSlide Index:=(s)
ActiveWindow.View.Paste
DoEvents
slidemoved = True
End If
'Goto next slide, reset strings
title1 = ""
title2 = ""
Next
'Start the next run until no slide has been moved
s = 1
Wend
End Sub
--------------------------------
Jim and Marcy Connett / J & M International schreef:

H.E.Weenink

unread,
Jun 6, 1999, 3:00:00 AM6/6/99
to
I found some little mistakes and took them out.

H.E.Weenink schreef:

> You might try this on. It will not go fast, but it will go.(At least it did on
> my computer:-)
> -------------------------
> Sub 900Sort()
> '
> ' This macro is made by Eef Weenink 05-06-99
> '
> Dim title1, title2 As String
> Dim s1, s2 As Object
> Dim c, s, m As Integer

> Dim SlideMoved As Boolean


> 'Set activwindow in slidesorterview otherwise the cut and
> 'paste does not work
> ActiveWindow.ViewType = ppViewSlideSorter
> 'Skip on all errors
> On Error Resume Next
>
> slidemoved = True
> 'Loop next part s long as needed (takes a very long time!)
> While slidemoved = True
> slidemoved = False
> 'Check all slides
> For s = 1 To (ActivePresentation.Slides.Count) - 1
> 'Pick up title from first slide
> Set s1 = ActivePresentation.Slides(s)
> title1 = s1.Shapes.Title.TextFrame.TextRange.Text
> 'Pick up title from second slide
> Set s2 = ActivePresentation.Slides(s + 1)
> title2 = s2.Shapes.Title.TextFrame.TextRange.Text
> 'compare titles
> c = StrComp(title1, title2, vbTextCompare)

> 'If title2 is lower (in alfabet) slide1 is moved after slide2

Brian Reilly, PowerPoint MVP

unread,
Jun 6, 1999, 3:00:00 AM6/6/99
to
Jim, Kathy and I talked about this late last week. If I were being
forece to do it, I'd just take each title, one by one, set a variable
to the text string of the Title and place it in a column in Excel.
Then when I ran out of slides, I could just sort the Excel list and be
done. (If you needed to know where that page was, you could also set
another variable to the Slide ID for the page you got the Title at and
move both values to two Excel columns and then sort.

PK Huntzinger

unread,
Jun 6, 1999, 3:00:00 AM6/6/99
to
Brian,
that works fine for a list of titles. the next step is to reorder the slides
in the pres based on the new order of titles.

Kathy

David Foster

unread,
Jun 6, 1999, 3:00:00 AM6/6/99
to
On Sat, 5 Jun 1999 20:44:28 -0700, "Jim and Marcy Connett / J & M
International" <ji...@pacifier.com> wrote:

>I've asked this question before, I'll ask it until I get an answer that I
>can use...surely someone has to know.
>
>I have 900 slides in one file that are titled. As I add new slides (to the
>bottom of the list by default), I manually alphabetize the slides by title.
>I'd like to know of how I could sort the list automatically.

Hmm, I'd suggest tossing them all into an array, sorting the array,
then re-ordering only when you need to. Maybe something like:

------------------------
Option Explicit
' Some useful constants


' a bunch of spaces should make empty titles sort first
Private Const gDefaultTitle As String = " "
' how many zeros in the format to make all ID's the same length
' (I should probably do this dynamically, it isn't that tough
Private Const gFormatZeros As Integer = 5


' the Main Sub

Public Sub SortSlidesByTitle()
Dim SlideTitleArray() As String
CreateArray SlideTitleArray()
SelectionSort SlideTitleArray()
MoveSlides SlideTitleArray()

End Sub

' because we need SlideID, and I'm too lazy to deal with 2 arrays,
' let's put the SlideID in the same array as the title

Private Sub CreateArray(ByRef SlideTitleArray() As String)
Dim sldcount As Long
Dim sld As Slide
Dim i As Long

sldcount = ActivePresentation.Slides.Count
ReDim SlideTitleArray(sldcount - 1)


For i = 0 To sldcount - 1
Set sld = ActivePresentation.Slides(i + 1)
If sld.Shapes.HasTitle Then
SlideTitleArray(i) = _
sld.Shapes.title.TextFrame.TextRange.Text
Else
SlideTitleArray(i) = gDefaultTitle
End If

SlideTitleArray(i) = SlideTitleArray(i) & _
Format$(sld.SlideID, String$(gFormatZeros, "0"))
Next

End Sub

' After the array is sorted, move the slides as the array suggests.
' You really don't want to be in sorter view when you do this, so
' you might want to add activewindow.ViewType = ppViewSlide
' before moving the slides around

Private Sub MoveSlides(ar() As String)

Dim i As Long
Dim sld As Slide
Dim CurID As Long

' moving slides is expensive, only do it if we have to

For i = 0 To UBound(ar)
CurID = CLng(Right$(ar(i), gFormatZeros))
With ActivePresentation.Slides
Set sld = .FindBySlideID(CurID)
If sld.SlideIndex <> i + 1 Then
sld.Cut
.Paste i + 1
End If

End With
Next

End Sub

' Now, sorting the array. Ordinarily, QuickSort is the fastest sort,
' but in this case the array is probably mostly sorted, so something
' different might be nice, how about SelectionSort?

Private Sub SelectionSort(ar() As String)

Dim NumEntries As Long
NumEntries = UBound(ar())

Dim MinVal As String
Dim TempVal As String
Dim i As Long, j As Long


For i = 0 To NumEntries
MinVal = i

For j = i + 1 To NumEntries
If StrComp(ar(j), ar(MinVal), vbTextCompare) < 0 Then
MinVal = j
End If
Next j
' swap
TempVal = ar(MinVal)
ar(MinVal) = ar(i)
ar(i) = TempVal

Next i
End Sub


--
David Foster | It has happened before, but there is
dfo...@panix.com | nothing to compare it to now.
finger for PGP key | -- "Gravity's Rainbow" Thomas Pynchon

David Foster

unread,
Jun 6, 1999, 3:00:00 AM6/6/99
to
On Sat, 05 Jun 1999 23:10:39 -0500, PK Huntzinger
<pkh...@worldnet.att.net> wrote:

>btw, this is sorta kinda how you'd do the random order slide show that
>someone asked about this weekend. you don't sort them, you'd randomize the
>numbers and then order them randomly, making sure not to duplicate. hmm...
>if you use slide ID and not slide number you wouldn't have dupes, would you?

Yep, same basic problem. If you see my other post, the only different
is that instead of calling Sort on the array you'd call some kind of
RandomizeArray() function instead. Maybe something like:

Public Sub RandomizeArray(ar() As String)



Dim NumEntries As Long
NumEntries = UBound(ar())

Randomize


Dim i As Integer
Dim rndPos As Integer
Dim tmpVal As String




For i = 0 To NumEntries

rndPos = CInt(Rnd() * NumEntries)
tmpVal = ar(i)
ar(i) = ar(rndPos)
ar(rndPos) = tmpVal
Next

Lewis Gudmundsen

unread,
Jun 6, 1999, 3:00:00 AM6/6/99
to
Jim and Marcy Connett / J & M International wrote in message ...

> I've asked this question before, I'll ask it until I get an answer that
> I can use...surely someone has to know.
>
> I have 900 slides in one file that are titled. As I add new slides (to
> the bottom of the list by default), I manually alphabetize the slides
> by title. I'd like to know of how I could sort the list automatically.

> I'm studying VB5 right now. Is there anything else I can look for
> or at on the web that might help me?
>
> Thx...yet again!
> --Jim

Jim Layman wrote...

> I've been noticing that you give awesome advise for powerpoint users. So,
> I thought I'd come to "the source" with my question...

> We use PowerPoint (dual monitor) for our worship slides at a church
> I attend. We now have over 900 slides in our master database.
> Each Sunday, we often have to add slides. What we'd like to do
> is automatically sort the list of slides so that all the titles are
> in alphabetical order. Right now, we just manually alphabetize a
> new slide, but we'd love to be able to just hit a few keys and
> have the list sorted automatically.

> ...and to this day, we've not been able to do this?

> Could you offer any assistance?

> Thanks!
> --Jim

Hello Jim, Jim and Marcy,

All newsies have "awesome advise" when it works. But... The value of using
the newsgroup and even becoming a newsie is that your comment can be helpful
to someone else, or, at the very least, encouraging.

Please ALWAYS submit remarks and needs as news items for everyone's
benefit... Though we newsies can never claim to be the penultimate source on
PowerPoint, we each make a lot of effort.

First, an observation. 900 slides in your database? If each slide -- or a
few slides relating to a common name or subject -- is included in one
PowerPoint file name, then you are really in good shape for the information
I will present. If all 900 are in one file, then you can skip the rest
unless you are willing to break the file into many small files of one or a
few slides each.

Even with the threads offered on using VBA as a solution for sorting
individual slides, I have difficulty in how a slide title could ever be used
for sorting. Could slide titles possibly have names like "Anderson, Jim
Wedding," "Anderson, Jim Picnic"... I have difficulty determining how
significant characters only could be sorted. Titles would always have
non-meaningful sort characters.

While I cannot "see" how individual slides have an ability of being sorted
except by moving them around in the slide sorter view of PowerPoint, you can
sort by text, by number or by date that is included in a PowerPoint file
name. And since a PowerPoint file may be just one slide or the slides
relating to an event or subject, all slides could thus be "sorted." And
then, using the play list feature explained later, you could show the sorted
slides.

In any case, be sure that individual PowerPoint slide FILES do not grow too
large and be sure that you have adequate backup of your files (GrandParent,
Parent, and Child). Three levels of backup, including one that is kept off
site in case of catastrophe is just good planning.

Yes, you can have slides auto sorted by either text, number or date and then
either in ascending or in descending order. I do not use numbers to identify
file presentations. But I do want sorts by both text and/or dates. To
accomplish sorting for both text and/or dates, the PowerPoint file name must
begin with the significant letter(s). I have accomplished this by using the
first six letters of my PowerPoint file names as reserved. If the alpha name
does not require 6 letters, I use hyphens to fill the remainder of the 6
reserved letters. After the six reserved letters, I continue with Any ol'
Name but I always use an underscore "_" instead of spaces. And in the
remaining Any ol' Name, I also included a six place date. Following are
examples of PowerPoint file names that I use:

E:\My_Documents\powerpoint\PFIZER_the_greenbrier_prez_04-12-98.ppt
E:\My_Documents\powerpoint\HOUSE-_03-24-99.ppt
E:\My_Documents\powerpoint\STOCKH_03-15-94.ppt
E:\My_Documents\powerpoint\HLR---_project_01-15-99

That way, I have all Pfizer company materials able to be sorted together
when doing an alpha sort and I have a 6-digit significant date upon which I
can sort. Using underscores instead of spaces is a smart way to avoid many
problems as long as the 8-digit file name continues to be used by some
software (and for many other reasons, including those of tech specialists
who say "never use spaces in file names").

OK, you can sort your PowerPoint files (and thus your slides). Then a Play
List as described by the Second Insert below can be used. The PowerPoint
Viewer is then used to play the Play List file.

In order to sort the Play List file, you will need to create the play list
file inside Microsoft Word or similar software that can sort lists of items.
And if you do use Microsoft Word, then you must use "save as" to save the
file as a "TXT" file but with the 3-letter extension changed to "LST". If
your Play List file gets saved as a ".txt", just use Windows Explorer to
change the file name to have .LST as its extension. You can show the Play
List by using the PowerPoint Viewer and browsing for files with .lst (.LST)
as their extension upon using the drop-down list of the Viewer to indicate
"files of type: .lst". You can also use a command-line option in front of a
presentation name in a play list to control how a presentation or group of
presentations runs. (More about the command-line option in the Third Insert
that follows.)

In Word, the auto sorting of a list is accomplished by using select all and
then the Sort item found under the Table drop-down menu. (You do not have to
be in a table. Selection of multiple lines that are paragraphs is just
fine.) The helpful issue here is that you can have just one slide in each
PowerPoint file or many slides in one file, for example,
ANDERS_the_Anderson_wedding_04-15-97.PPT that relate to a subject. (Of
course, the sorting does not care about file content, just the file name).
In the case of text searches, the sort will be by the file name and include
any directory names that are included (as part of the path). Thus, in order
for the six character naming convention that I use to work in text sorting,
all of my files must be in the same directory. On the otherhand, if I sort
by date, then the sort excludes all letters and uses the date sequence
"11-11-11" only, regardless of where the sequence appears. (Use hyphens as
no other character can be used in date searches while also being used for a
file name.) The sort by date is looking for characteristics of a date field
and thus the files can even be in different directories (as would be
indicated by different path names).

The rules for sort order that Word uses

____>First Insert<_________

If you sort by text--
Microsoft Word first sorts items that begin with punctuation marks or
symbols (such as !, #, $, %, or &). Items that begin with numbers are sorted
next; and items that begin with letters are sorted last. Keep in mind that
Word treats dates and numbers as though they were text. For example, "Item
12" is listed before "Item 2."

If you sort by numbers--
Word ignores all characters except numbers. The numbers can be in any
location in a paragraph.

If you sort by date--
Word recognizes the following as valid date separators: hyphens, forward
slashes (/), commas, and periods. Word also recognizes colons (:) as valid
time separators. If Word doesn't recognize a date or time, it places the
item at the beginning or end of the list (depending on whether you're
sorting in ascending or descending order).

If you sort by a specific language--
Word sorts according to the rules for sort order of the language. Some
languages have different sort orders to choose from.

If two or more items begin with the same character--
Word evaluates subsequent characters in each item to determine which item
comes first.

If the data consists of field results--
Word sorts the field results according to the sort options that you've set.
If an entire field (such as a last name) is the same for two items, then
Word next evaluates subsequent fields (such as a first name).

____< End of First Insert >_________


The following is detail for creating a play list:

____>Second Insert<_________

Create a play list to run presentations sequentially from the PowerPoint
Viewer--

Open Notepad or a new, blank document in any word-processing program.

In the document, type the file names (including the file extensions) of the
presentations you want to show. Type each file name on a separate line. If
your presentations are in different folders, include the path to the file
location - for example,
"C:\My Documents\Pres1.ppt."

Save the document, as a text file with an .lst extension. If your
presentations are all in the same folder, save the document to that folder.
If not, you can save the document to whatever folder you want.

The presentations are run one after another in the Viewer when you enter the
file name of the document that contains the play list and then click Show.

Notes--

If your presentation file name contains spaces, include quotation marks
around the file name - for example, "Sales Presentation.ppt."

To play all the presentations in your play list sequentially, and then play
them again in order until you press ESC, type each file name on the same
line, separated by a space. In the Viewer, click Options, click Override
saved settings, and then select the Loop continuously until 'Esc' check box.

You can control how a presentation runs by using command-line options in a
play list.

____< End of Second insert >_________

Command-line options in a play list.
____>Third insert<_________

Control how a presentation runs by using command-line options in a play list
You can use a command-line option in front of a presentation name in a play
list to control how a presentation or group of presentations runs.

Use this option To--
/a Automatically advance the slides in the presentation
/r=m-n, where m and n represent numbers for the first and last slide in the
range, respectively Specify a slide range. For example, \R=3-5 would specify
slides 3 through 5.
/l Loop continuously until ESC is pressed
/k Set a presentation to run in kiosk mode
/v Show the macro virus warning

To apply an option to individual presentations in the play list, use the
following format--

option path\filename1

For example, to run the PRES1 slide show repeatedly until ESC is pressed and
then run the PRES2 slide show repeatedly until ESC is pressed, use the
following--

/l Pres1.ppt
/l Pres2.ppt

To apply an option to a group of presentations in the play list, use the
following format--

option "path1\filename1" "path2\filename2"

For example, to run each presentation once, and then begin again after the
last presentation has completed, use the following--

/l "Pres1.ppt" "Pres2.ppt" "Pres3.ppt"

____< End of Third Insert >_________


Hope the above is helpful. If you like the explanations included in the
inserts above, you will really like Office 2000 as they are samples of the
detail help files that 2000 offers. (Insert 1 is form Word 2000 while Insert
2 and Insert 3 are taken from PowerPoint 2000.) Please note that the
PowerPoint Viewer in PowerPoint 2000 is still basically the same as the one
released with PowerPoint 97, SR-2. All the instructions above are applicable
to PowerPoint 95, PowerPoint97 and PowerPoint 2000. If you need to download
the viewer for use with Windows 95/98/98SE and NT, it is available at:

http://officeupdate.microsoft.com/downloadDetails/ppview97.htm

Lewis Gudmundsen
Microsoft PowerPoint End-user MVP

----- Original Message -----
From: Lewis Gudmundsen
Newsgroups: microsoft.public.powerpoint
Sent: Saturday, May 29, 1999 2:32 PM
Subject: Re: PowerPoint97 on 2 displays


> Layman Family wrote in message ...
> > Hi,
> >
> > I have 2 displays on my win98 box. I want to
> > control the presentation from one display (the
> > primary or boot display) and view it on the
> > other. Is there any official way or hack
> > to do this?
> >
> > Thanks,
> > Paul
>
> Hello Paul,
>
> Multi-monitor capability is a Win 98 feature that is supurb for increasing
> monitor real estate. Understanding that PowerPoint 97 came out well
> ahead of the possibility of the multiple monitor feature of Win 98,
> there is no way, presently, of doing what you have asked about.
> (Unless you have purchased a recent notebook computer
> and/or projection equipment that provides a
> software add-in allowing such to occur.)
>
> Of course, PowerPoint 2000 does allow all that you have asked
> about and much more as regards using the multiple monitor
> capabilities.
>
> The work around in PowerPoint 97 is to connect two computers using a
> serial cable. Then, under the Slide Show drop down menu, select
> View on Two Screens to set them up.
>
>
> More info:
> ___________> Insert <________
>
> View a slide show on one computer while you control it from another
>
> If you want to control a presentation from one computer while you show it
> on another -- for example, from a laptop computer to a computer with
> a large-screen monitor-- you can connect the two with a null-modem
> cable. You'll also need PowerPoint 97 installed on both computers
> and one COM port available on each machine.
> 1 Open the presentation you want to run.
> 2 On the Slide Show menu, click View on Two Screens, and then follow the
> instructions.
>
> Note During the presentation, you can right-click, and then use the same
> Stage Manager tools you use when you give a presentation conference.
> For example -- you can view your notes and meeting meetings
> on the controlling computer without displaying them on the
> other computer.
> ___________<End Insert>________
>
>
> Lewis Gudmundsen
> Microsoft PowerPoint End-user MVP

Steve Rindsberg

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to

>
> go from 1 to howevermanyslides
> get the slide ID, title
> put these in a temporary spot, my guess would be an array
> sort by the title
> then assign the slide number to the list in the sorted order
>
>I don't quite understand arrays, so that's where I'm stumped right now.
>any and all ideas are welcome, especially if I'm going about this the wrong
>way <g>
>


Sounds to me like you're on the right track.

Arrays. Simple, once the "AHA!" light goes on. Try this to see if it flips
yer switch:

For starters, think of an array as though it were a spreadsheet. Only
instead of the columns having letters, they have numbers and numbering
starts with 0 instead of 1 unless you tell it otherwise.

So when you dim myArray(12, 42) you're effectively setting up a 13 x 43
(starting at zero don't forget) "spreadsheet". You can refer to any "cell"
on the sheet by row and column number, as in:

myArray(0,0) (first row, first column)

You can override the default 0 starting point and set up multi-dimensional
arrays, a la

dim myArray(1 to 12, 1 to 42, 1 to 100)

To continue the metaphor, this would be equivalent to 100 12 by 42
worksheets in Excel.

>btw, this is sorta kinda how you'd do the random order slide show that
>someone asked about this weekend. you don't sort them, you'd randomize the
>numbers and then order them randomly, making sure not to duplicate. hmm...
>if you use slide ID and not slide number you wouldn't have dupes, would
you?
>

>Kathy

Steve Rindsberg

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to

David Foster wrote in message <375abc1d...@msnews.microsoft.com>...

>On Sat, 5 Jun 1999 20:44:28 -0700, "Jim and Marcy Connett / J & M
>International" <ji...@pacifier.com> wrote:
>
>Hmm, I'd suggest tossing them all into an array, sorting the array,
>then re-ordering only when you need to. Maybe something like:
>


Has the advantage of not blowing up if Excel isn't there, too. We'll wean
Reilly off that nasty thing yet.

Kathy Huntzinger

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to
> Sounds to me like you're on the right track.

ahh.. it takes so little to encourage me. <g>
garçon, another brick if you please!

> Arrays. Simple, once the "AHA!" light goes on.

the light keeps flickering... kind of like those floaters in your eye
(just spent way too much time at the optometrist). you know they are
there but if you try and focus on them they disappear.

thanks for the explanation. I get it (mostly). I'm printing out yours
and David's explanations/code to ponder on. lunchtime is never long
enough to work these things out.

later,
Kathy

Kathy Huntzinger

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to
Lewis,

> Hello Jim, Jim and Marcy,

It's monday (which could explain a lot on my end) but I have to confess
I have no idea what you are talking about here.

befuddled pk

Steve Rindsberg

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to
>
>ahh.. it takes so little to encourage me. <g>
>garçon, another brick if you please!
>


Certainly, Madame. If Madame will just climb in here alongside the cask of
Amontillado ...

Lewis Gudmundsen

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to
Kathy Huntzinger wrote in message ...
> Lewis,

>
> > Hello Jim, Jim and Marcy,
>
> It's monday (which could explain a lot on my end) but I have to confess
> I have no idea what you are talking about here.
>
> befuddled pk

Sorry to befuddle you...

But a "Jim Layman" wrote with the 900 slide sort problem and a "Jim and
Marcy Connett" also wrote with a 900 slide sorting problem. Perhaps, Jim
Connett is Jim Layman. Perhaps, Jim and Jim are different persons. In any
case, my reply included both persons original threads. Just look back if you
you wish.

Lewis Gudmundsen

PK Huntzinger

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to
and just when did I heap injury upon insult to you that you would suggest
such a thing??

Actually, that calls up a terrifying movie that I watched at an
impressionable age. so scary I forget what it was about, just remember the
wall biz.. Canterbury?? something English anyway *shudder*

PK Huntzinger

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
Lewis,
I'm sorry, I wasn't clear. It was the part between the jim, jim and marcy
and the lewis gudmundsen that was fuddling my bees. I'll try it again on a
not-monday, if I have one of those this week(month).

Kathy

Lewis Gudmundsen wrote:
>
> Kathy Huntzinger wrote in message ...
> > Lewis,
> >

> > > Hello Jim, Jim and Marcy,
> >

H.E.Weenink

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
Dear All,

Why do we try to sort this out in Excell? You might look at a
PPT-presentation as if it is an array for it self. The next thing is to
reorder that array.

Option Explicit
Sub Sort900_1()
' This macro is made by Eef Weenink 08-06-99
Dim ItemOnSlide1, ItemOnSlide2 As String


Dim s1, s2 As Object

Dim s, i, c, m As Integer


'Set activwindow in slidesorterview otherwise the cut and
'paste does not work
ActiveWindow.ViewType = ppViewSlideSorter

'Skip on all errors.
On Error Resume Next
'Check all slides
For s = 1 To ActivePresentation.Slides.Count
'Goto next slide, reset item1
ItemOnSlide1 = ""


'Pick up title from first slide
Set s1 = ActivePresentation.Slides(s)

ItemOnSlide1 = s1.Shapes.Title.TextFrame.TextRange.Text
'Or compare anything else you want in the slide: Index, Date,
etc.

'Start comparing item with items on allready sorted slides
For i = 1 To s
'Goto next slide, reset item2
ItemOnSlide2 = ""


'Pick up title from second slide

Set s2 = ActivePresentation.Slides(i)
ItemOnSlide2 = s2.Shapes.Title.TextFrame.TextRange.Text
'compare items
c = StrComp(ItemOnSlide1, ItemOnSlide2, vbTextCompare)
'If item 2 is of an lower order than item 1 the slide is moved
'just in front of the slide(i)
If c = -1 Then
s1.Cut
ActivePresentation.Slides.Paste (i)
DoEvents
'i is made equal to s so the for-next loop stops
i = s
End If
Next
Next
End Sub


Steve Rindsberg

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to

PK Huntzinger wrote in message <375C9D9F...@worldnet.att.net>...

>and just when did I heap injury upon insult to you that you would suggest
>such a thing??
>


One word triggers another and there's just no stopping me.

Or if you prefer,

It was Monday. I couldn't help myself. <g>


Lewis Gudmundsen

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
OK,

PK, my real need for advancing my understanding about bricks, arrays, VBA,
etc, is the following:

__________Insert from prior posting_________


Even with the threads offered on using VBA as a solution for sorting
individual slides, I have difficulty in how a slide title could ever be
used for sorting. Could slide titles possibly have names like
"Anderson, Jim Wedding," "Anderson, Jim Picnic"... I have

difficulty determining how significant characters *only* can be


sorted. Titles would always have non-meaningful sort characters.

_________End of inserted material_________

Please help me understand what "solution" is being attempted. Seems to fit
my prior statement that "not all problems have solutions, but many solutions
have problems." What is the sort field in this instance? What is a Title,
anyway? Could all the "The Smith Family" slides be alphabatized under "The?"
I just cannot understand what might be used as the basis for sorting. It
just does not compute!

Lewis Gudmundsen
Microsoft PowerPoint End-user MVP


PK Huntzinger wrote in message...


> Lewis,
> I'm sorry, I wasn't clear. It was the part between the jim, jim and marcy
> and the lewis gudmundsen that was fuddling my bees. I'll try it again on a
> not-monday, if I have one of those this week(month).
>
> Kathy
>
> Lewis Gudmundsen wrote:
> >
> > Kathy Huntzinger wrote in message ...
> > > Lewis,
> > >

> > > > Hello Jim, Jim and Marcy,
> > >

Kathy Huntzinger

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
Lewis,

My understanding from the original poster was that these were song
titles (with lyrics, perhaps, on the slide itself? not sure about this
part). It sounds as though he is using PPT to compile all the songs,
some 900+ at this point, and as I understand it, all in the same file.

I agree that this method would not work for some, maybe most,
presentations, but for this particular fellow, it seems to be just what
he needs.

So the solution is not just a sorted list of titles, but I re-sorted
order of slides. As new titles (songs/slides) are added, the point is to
re-order the whole presentation, so that the titles are once again
alphabetical.

Now, you understand, I may be WAY off the mark. But this is how I
understand it.

For the bricks... you have to talk to Steverino. He's got the things for
bricks, I just use them to pound vba in with.

Kathy

Lewis Gudmundsen wrote:
>
> OK,
>
> PK, my real need for advancing my understanding about bricks, arrays, VBA,
> etc, is the following:
>
> __________Insert from prior posting_________

> Even with the threads offered on using VBA as a solution for sorting
> individual slides, I have difficulty in how a slide title could ever be
> used for sorting. Could slide titles possibly have names like
> "Anderson, Jim Wedding," "Anderson, Jim Picnic"... I have

> difficulty determining how significant characters *only* can be


> sorted. Titles would always have non-meaningful sort characters.

> _________End of inserted material_________
>
> Please help me understand what "solution" is being attempted. Seems to fit
> my prior statement that "not all problems have solutions, but many solutions
> have problems." What is the sort field in this instance? What is a Title,
> anyway? Could all the "The Smith Family" slides be alphabatized under "The?"
> I just cannot understand what might be used as the basis for sorting. It
> just does not compute!
>

> Lewis Gudmundsen
> Microsoft PowerPoint End-user MVP
>

> PK Huntzinger wrote in message...
> > Lewis,
> > I'm sorry, I wasn't clear. It was the part between the jim, jim and marcy
> > and the lewis gudmundsen that was fuddling my bees. I'll try it again on a
> > not-monday, if I have one of those this week(month).
> >
> > Kathy
> >
> > Lewis Gudmundsen wrote:
> > >
> > > Kathy Huntzinger wrote in message ...
> > > > Lewis,
> > > >

> > > > > Hello Jim, Jim and Marcy,
> > > >

Brian Reilly, PowerPoint MVP

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
Kathy, Shoulda done what I done on Monday. Good sailing, good
swimming. Now, on Tuesday, I'm just as behind as you are, just tanner.
Brian Reilly, PowerPoint MVP

On Tue, 08 Jun 1999 00:34:19 -0500, PK Huntzinger
<pkh...@worldnet.att.net> wrote:

>Lewis,
>I'm sorry, I wasn't clear. It was the part between the jim, jim and marcy
>and the lewis gudmundsen that was fuddling my bees. I'll try it again on a
>not-monday, if I have one of those this week(month).
>
>Kathy
>
>Lewis Gudmundsen wrote:
>>
>> Kathy Huntzinger wrote in message ...
>> > Lewis,
>> >

>> > > Hello Jim, Jim and Marcy,
>> >

Kathy Huntzinger

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
Brian,

> Now, on Tuesday, I'm just as behind as you are, just tanner.

It doesn't take much, I am a true heliophobe.
I shine best under the light of lady luna.

pk

Jim and Marcy Connett / J & M International

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
YES YES YES YES YES YES!!!! For anyone working on this question, the
description Kathy has given is EXACTLY THE ISSUES. I honestly could not
have described it better!

The reason why 900 slides in one file works for us is because depending on
the song used, we can simply enter the slide number and change the slide
displayed at will.

Excellent job, Kathy, of reading my mind! :)

--Jim

PS...just for the record...I have absolutely NO IDEA who "Jim Laymen" is. I
am the one who originally posted this question...and am the one who is so
thrilled that it is getting this much attention!

Kathy Huntzinger <khunt...@tsc.com> wrote in message
news:375D2117...@tsc.com...


> Lewis,
>
> My understanding from the original poster was that these were song
> titles (with lyrics, perhaps, on the slide itself? not sure about this
> part). It sounds as though he is using PPT to compile all the songs,
> some 900+ at this point, and as I understand it, all in the same file.
>
> I agree that this method would not work for some, maybe most,
> presentations, but for this particular fellow, it seems to be just what
> he needs.
>
> So the solution is not just a sorted list of titles, but I re-sorted
> order of slides. As new titles (songs/slides) are added, the point is to
> re-order the whole presentation, so that the titles are once again
> alphabetical.
>
> Now, you understand, I may be WAY off the mark. But this is how I
> understand it.
>
> For the bricks... you have to talk to Steverino. He's got the things for
> bricks, I just use them to pound vba in with.
>
> Kathy
>
>
>
> Lewis Gudmundsen wrote:
> >
> > OK,
> >
> > PK, my real need for advancing my understanding about bricks, arrays,
VBA,
> > etc, is the following:
> >
> > __________Insert from prior posting_________

> > Even with the threads offered on using VBA as a solution for sorting
> > individual slides, I have difficulty in how a slide title could ever be
> > used for sorting. Could slide titles possibly have names like
> > "Anderson, Jim Wedding," "Anderson, Jim Picnic"... I have

> > difficulty determining how significant characters *only* can be


> > sorted. Titles would always have non-meaningful sort characters.

> > _________End of inserted material_________
> >
> > Please help me understand what "solution" is being attempted. Seems to
fit
> > my prior statement that "not all problems have solutions, but many
solutions
> > have problems." What is the sort field in this instance? What is a
Title,
> > anyway? Could all the "The Smith Family" slides be alphabatized under
"The?"
> > I just cannot understand what might be used as the basis for sorting. It
> > just does not compute!
> >

> > Lewis Gudmundsen
> > Microsoft PowerPoint End-user MVP
> >

> > PK Huntzinger wrote in message...

> > > Lewis,
> > > I'm sorry, I wasn't clear. It was the part between the jim, jim and
marcy
> > > and the lewis gudmundsen that was fuddling my bees. I'll try it again
on a
> > > not-monday, if I have one of those this week(month).
> > >
> > > Kathy
> > >
> > > Lewis Gudmundsen wrote:
> > > >
> > > > Kathy Huntzinger wrote in message ...
> > > > > Lewis,
> > > > >

> > > > > > Hello Jim, Jim and Marcy,
> > > > >

Lewis Gudmundsen

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
Hello Jim and Marcy Connett / J & M International,

Now we are on the same track(s). Thanks to you and Kathy.

My only contribution is simply to recommend that multiple backups of the
PowerPoint song volume file be kept. One should never blame PowerPoint for
being the culprit that "swallowed the canary," oops, I meant music...

Eef Weenink

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
> Dear Jim,
>
> If I understand your question, then you want to reorder the presentation
> alfabetically? You might try the macro I have made for this: I posted it
> allready in the newsgroup. But to make it more easy I send you a copy. It is
> attached to this mail , called sort_900.bas
>
> Installing:
> 1. Open Powerpoint; Open the Visual Basic commandbar, Choose editing
> 2. Choose File; Import;
> 3. Choose the SORT_900.BAS
> 4. Run the macro
>
> What it does:
> It compares the slide-titles and sorts them. The first time it will take more
> time depending on hoe "unsorted" the presentation is. Every time you insert a
> new slide run the macro and the slide will be put in place.
>
> Just give a yell if more help is needed.
> Eef weenink

Jim and Marcy Connett / J & M International schreef:

sort_900.bas
0 new messages