Article ID: 166859
Article Last Modified on 10/11/2006
' This code determines what slide is currently visible in the
' slide show and then it clears the print range and prints out the
' current slide.
Sub PrintCurrentSlide()
' Declare lSldNum as a long integer.
Dim lSldNum As Long
' Assign lSldNum to the current slide number.
lSldNum = SlideShowWindows(1).View.Slide.SlideNumber
' Set the print options for the active presentation.
With ActivePresentation.PrintOptions
' Set RangeType to print a slide range.
.RangeType = ppPrintSlideRange
' Delete old print range settings.
.Ranges.ClearAll
' Set Ranges to the new range for the current slide.
.Ranges.Add lSldNum, lSldNum
End With
' Using the current print settings print the slide to the default
' printer.
ActivePresentation.PrintOut
End Sub
176476 OFF: Office Assistant Not Answering Visual Basic Questions
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 8.00 ppt8 vba vbe macppt
Keywords: kbcode kbdtacode kbinfo kbprint kbprogramming KB166859