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

Vba to Print Slide in Slideshow View

Often you may want to print the slide showing on the screen in show view, This may be a certificate or score. If you are familiar with PowerPoint vba you may find the vba print range type ppPrintCurrent.

You write code like this and it seems to work just fine.

Sub printCurrWRONG()
ActivePresentation.PrintOptions.RangeType = ppPrintCurrent
ActivePresentation.PrintOut
End Sub

You will soon find that sometime it prints the WRONG slide though. This is because ppPrintCurrent prints the slide selected in EDIT view. This is not always the slide showing in show view. To print the current slide in the show you need to do this:

Sub printCurr()
Dim currSldnum As Long
currSldnum = SlideShowWindows(1).View.CurrentShowPosition
With ActivePresentation.PrintOptions
.RangeType = ppPrintSlideRange
.Ranges.ClearAll ' kill any current range settings
.Ranges.Add Start:=currSldnum, End:=currSldnum
End With
ActivePresentation.PrintOut
End Sub

If you have created a shape to click to print the slide you might NOT want it show on the print. This variation does that:

Sub printCurr2(oshp As Shape)
Dim currSldnum As Long
oshp.Visible = False 'hides the button
currSldnum = SlideShowWindows(1).View.CurrentShowPosition
With ActivePresentation.PrintOptions
.RangeType = ppPrintSlideRange
.Ranges.ClearAll ' kill any current range settings
.Ranges.Add Start:=currSldnum, End:=currSldnum
End With
ActivePresentation.PrintOut
oshp.Visible = True
End Sub

 

 

 

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