Use VBA to print a single PowerPoint slide

It's easy to print the current PowerPoint slide -- and almost as easy to automate the process.

It's easy to print the current slide. Simply select the slide you want to print, choose Print from the File menu, click the Current Slide in the Print Range options, and click OK. Or select the slide you want to print and click the Print icon on the Standard toolbar. It couldn't be simpler. While the built-in printing features are adequate for most, you can automate the process using the following subprocedure, if necessary: Sub PrintCurrentSlide() Dim intSlideNumber As Integer On Error GoTo errHandler intSlideNumber = ActiveWindow.Selection.SlideRange.SlideNumber Application.ActivePresentation.PrintOut intSlideNumber, intSlideNumber Exit Sub errHandler: If Err.Number = -2147188160 Then MsgBox "Select a single slide", vbOKOnly, "Error" Else MsgBox Err.Number & ": " & Err.Description, vbOKOnly, "Error" End If End Sub How you execute the code will depend on your needs. The current error handling catches one specific error — the error generated when you select more than one slide. The PrintOut method also lets you collate copies and print multiple copies. For more information, search for PrintOut Method in the Visual Basic Editor's Help files.

About Susan Harkins

Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

Editor's Picks

Free Newsletters, In your Inbox