Article ID: 162175
Article Last Modified on 10/11/2006
Sub ReverseSlideOrder()
Dim lNumberOfSlides As Long
Dim x As Long
' Determine how many slides are in the presentation.
lNumberOfSlides = ActivePresentation.Slides.Count
' Check if more than one slide.
If lNumberOfSlides = 1 Then
' Not enough slides to flip.
' Display a message and exit the macro.
MsgBox "There is only one slide in " _
& "your presentation.", vbExclamation, _
"One Slide Available"
End
Else
' More than two slides selected.
For x = 1 To lNumberOfSlides - 1
' Reorder the slides.
ActivePresentation.Slides(lNumberOfSlides).Cut
ActivePresentation.Slides.Paste x
Next x
End If
End Sub
176476 OFF: Office Assistant Not Answering Visual Basic Questions
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 97 8.00 kbmacro kbpptvba ppt8 vba vbe macppt mac_ppt ppt98 98 powerpt
Keywords: kbcode kbdtacode kbhowto kbmacro kbprogramming KB162175