PDA

View Full Version : Slide Show view print button



BobDole
08-05-2008, 12:38 AM
Hi Everyone,
All I want is to have a Shape that will print the current slide in Slide Show view. It has to be a Shape, because I want to animate it. It must not appear on the print.
I thought this would be an easy Google, but nothing offers me exact solution.

After 2 days I have arrived at this code:
Sub PrintResults1()

ActivePresentation.Slides("Slide25").Shapes("BackButton1").Visible = False 'Added to hide button before printing
ActivePresentation.Slides("Slide25").Shapes("ForwardButton1").Visible = False 'Added to hide button before printing
ActivePresentation.Slides("Slide25").Shapes("PrintButton1").Visible = False 'Added to hide button before printing
ActivePresentation.PrintOptions.OutputType = ppPrintOutputSlides
ActivePresentation.PrintOut From:=17, To:=17
ActivePresentation.Slides("Slide25").Shapes("PrintButton1").Visible = True 'Added to show button again after printing
ActivePresentation.Slides("Slide25").Shapes("ForwardButton1").Visible = True 'Added to show button again after printing
ActivePresentation.Slides("Slide25").Shapes("BackButton1").Visible = True 'Added to show button again after printing

End Sub

This seems to work, but the animation on the slide repeats after the printing.

Can anyone suggest more efficient coding?

NB ? In my presentation the slide to be printed is slide 17, which seems to have acquired the name ?Slide25? somehow.

John Wilson
08-22-2008, 02:05 AM
I couldn't repro your problem. The slide is named "Slide 25" as it is probably the 25th slide you produced?

This is the code I used

Sub printthisslide()
Dim osld As Slide
Set osld = ActivePresentation.SlideShowWindow.View.Slide
osld.Shapes("print").Visible = False
osld.Shapes("next").Visible = False
ActivePresentation.PrintOptions.OutputType = ppPrintOutputSlides
ActivePresentation.PrintOut osld.SlideIndex, osld.SlideIndex
osld.Shapes("print").Visible = True
osld.Shapes("next").Visible = True
End Sub