Header
PowerPoint tips, hints and tutorials that will change your presentations for ever!

INDEX

 

Jigsaws
Sounds
Video
Custom Shows
vba code
NaviSlides
Games for teachers
Bullets
Triggers
Security
Flash Cards
Multiple Instances
PowerPoint 2007
Mail Merge
Random events
Animation
Hyperlinks
Set spellcheck language


Home buttonTutorial buttonContact buttonProducts button


PowerPoint 2007 / 2010 Slide Numbers

From version 2007 it is possible to individually edit slide numbers. This means that you could eg number slides omitting hidden slides or title layouts with consequtive numbers. This cannot be done in earler versions.

If you have several hidden slides and many other slides this is of course a bit of a chore! The vba code below will do it for you virtually instantly, detecting hidden (OR Title slides) and ajusting the numbers accordingly.

Sub renum()
Dim osld As Slide
Dim oshp As Shape
Dim inum As Integer
For Each osld In ActivePresentation.Slides
osld.HeadersFooters.SlideNumber.Visible = True
'Comment out ONLY one of the next two lines
'If osld.SlideShowTransition.Hidden = True Then
If osld.CustomLayout.Name = "Title Slide" Then
inum = inum - 1
osld.HeadersFooters.SlideNumber.Visible = False
Else
For Each oshp In osld.Shapes
If oshp.Type = msoPlaceholder Then
If oshp.PlaceholderFormat.Type = ppPlaceholderSlideNumber Then
oshp.TextFrame.TextRange = CStr(osld.SlideNumber + inum)
End If
End If
Next oshp
End If
Next osld
If Val(Application.Version) < 12 Then MsgBox "I did tell you it won't work!"
End Sub

You should be able to easily adapt the code to check for other types of slide.

I don't know how to use code!

 

 
 

Back to the Index Page

POWERPOINT BLOG

Articles on your favourite sport

Free Microsoft PowerPoint Advice, help and tutorials, Template Links
This website is sponsored by Technology Trish Ltd
© Technology Trish 2007
Registered in England and Wales No.5780175
PowerPoint® is a registered trademark of the Microsoft Corporation