In a custom slide show the page numbers are not shown on the Notes view. It
is a limitation that you'll find in the Microsoft KB, and is nominated as a
future enhancement.
However, here in the real world I need to print a manual that has been
written in PowerPoint, and any manual needs page numbering. (I used
PowerPoint because I can show the slides, and have the user refer to the
notes as further reading after the class. )
Exporting PowerPoints to Word is a mess, so I can't get numbering that way.
I am currently writing a macro that will go through each slide in the custom
show, insert a text box that contains an incremented number. The theory will
work, but the VBA help is no help for me getting started on this. e.g. how
do you find what slides are in a custom slide show?
If anyone has done something like this, or has a better idea then please let
me know
Thanks
Steve
==============================
Using the NamedSlideShow Object
Use NamedSlideShows(index), where index is the custom slide show name or
index number, to return a single NamedSlideShow object. The following
example deletes the custom slide show named "Quick Show."
ActivePresentation.SlideShowSettings.NamedSlideShows("Quick
Show").Delete
Use the SlideIDs property to return an array that contains the unique
slide IDs for all the slides in the specified custom show. The following
example displays the slide IDs for the slides in the custom slide show
named "Quick Show."
idArray =
ActivePresentation.SlideShowSettings.NamedSlideShows("QuickShow").SlideIDs
For i = 1 To UBound(idArray)
MsgBox idArray(i)
Next
=======================
Regards
Shyam
http://home.onestop.net/shyam
http://officetips.homepage.com
'Listing all customs shows and the Slides in them
Sub CustomShowList()
Dim I as Integer
Dim J as Integer
Dim IDsofSlide As Variant
'Loops thru all available custom shows
For I = 1 To ActivePresentation.SlideShowSettings.NamedSlideShows.Count
' Name of Custom Show
Debug.Print ActivePresentation.SlideShowSettings.NamedSlideShows(i).Name
' Returns an array of SlideIDs which can used to ascertain which slides
are
' included in the show
IDsofSlide =
ActivePresentation.SlideShowSettings.NamedSlideShows(i).SlideIDs
' Loop thru the array to list the SlideIDs
For J = 1 To UBound(IDsofSlide)
Debug.Print IDsofSlide(J)
Next J
Next I
End Sub
"Steve N" <steve...@infrasoft-civil.com> wrote in message
news:#ToBshmn$GA.1492@cppssbbsa06...
Let me know!
Have a nice day
Regards
Shyam
http://home.onestop.net/shyam
http://officetips.homepage.com
' Purpose: Prints Custom Shows Notes Pages with Page Numbers
' Parameters: Custom Show Name
' Usage: CSNotesWithPgNos "My Custom Show"
Sub CSNotesWithPgNos(strShowName As String)
' Change this number to specify your starting slide number.
Const StartNo As Long = 1
' Ideally you need to some error checking here to determine
' if any custom shows are defined. And if so check
' for the presence of the requested custom Show
' That is left as exercise.
Dim pgBoxHeight As Long
Dim pgBoxWidth As Long
Dim pgBoxTop As Long
Dim pgBoxLeft As Long
Dim oPH As Shape
Dim bFound As Boolean
bFound = False
For Each oPH In _
ActivePresentation.NotesMaster.Shapes.Placeholders
' Find the notes pagenumber placeholder & pick up its format
With oPH
If .PlaceholderFormat.Type = ppPlaceholderSlideNumber Then
' Get the position of the page number placeholder.
pgBoxLeft = .Left
pgBoxTop = .Top
pgBoxWidth = .Width
pgBoxHeight = .Height
Debug.Print
' Get the formatting of the slide number placeholder.
.PickUp
' Found the slide number placeholder, so set the flag to true
bFound = True
Exit For
End If
End With
Next oPH
' See if a NotesPage number placeholder was found.
' If not found, exit the macro.
If bFound = False Then
' Unable to find slide number placeholder.
MsgBox "Your notes master does not contain a slide number " _
& "placeholder. Add a notes number placeholder", _
vbCritical, "Error"
Exit Sub
End If
' Get the array of slide IDs used in the show.
Dim IDsofSlidesInShow As Variant
IDsofSlidesInShow = ActivePresentation.SlideShowSettings _
.NamedSlideShows(strShowName).SlideIDs
Dim IdOfSlide As Variant
Dim CurrSlide As Slide
' Save the current background printing setting and
' then turn background printing off.
Dim bBkgrdPrinting As Boolean
bBackgroundPrinting = ActivePresentation.PrintOptions _
.PrintInBackground
ActivePresentation.PrintOptions.PrintInBackground = msoFalse
' We want to print the notes page
ActivePresentation.PrintOptions.OutputType = ppPrintOutputNotesPages
' Loop through every slide in the custom show.
Dim xCtr As Long
xCtr = 0
For Each IdOfSlide In IDsofSlidesInShow
' The first element in the array is zero and not used.
If IdOfSlide <> 0 Then
' Get a reference to the slide.
Set CurrSlide = ActivePresentation.Slides _
.FindBySlideID(IdOfSlide)
With CurrSlide
' Create a text box and add a temporary page number in it.
Dim PgNumShape As Shape
Set PgNumShape = .NotesPage.Shapes _
.AddTextbox(msoTextOrientationHorizontal, _
pgBoxLeft, pgBoxTop, _
pgBoxWidth, pgBoxHeight)
' Apply the formatting used for the slide number placeholder
' to the text box you just created.
PgNumShape.Apply
' Strangely the statement given below failed for NotesPage
' though it works for Slides
' .NotesPage.HeadersFooters.SlideNumber.Visible = msoFalse
' And so I was unable to hide the page numbers of notes master
' Therefore I overlayed the textbox over the pagenumber
' placeholder with a background fill.
With PgNumShape
.Fill.Visible = msoTrue
.Fill.ForeColor.SchemeColor = ppBackground
End With
' Add the page number text to the text box.
PgNumShape.TextFrame.TextRange = _
"Page no." & CStr(xCtr + StartNo)
' Print the slide.
ActivePresentation.PrintOut .SlideNumber, .SlideNumber
' Increment the array element positon.
xCtr = xCtr + 1
' Delete the temporary slide number shape.
PgNumShape.Delete
End With
End If
Next IdOfSlide
' Restore the background printing setting.
ActivePresentation.PrintOptions.PrintInBackground = bBkgrdPrinting
End Sub
Now for the problem. It occurs when you delete the Notes Page Numbering
placeholder. To restore it. Here is what you do:
Open you presentation and select View, Master, Notes Master.
Right click on the page and select Note Mater Layout.
In the Notes Master Layout window ensure that Page Number is Checked.
Click on OK
Close the Notes Master View
Run the macro. It should work without any problems.
Thank you for your time.
--
Regards
Shyam Pillai
http://home.onestop.net/shyam
http://officetips.homepage.com
=========================
"Shyam Pillai" <Sh...@Asia.com> wrote in message
news:#cDVgyrn$GA.249@cppssbbsa03...