Consulting

Results 1 to 2 of 2

Thread: Slide Show view print button

  1. #1
    VBAX Newbie
    Joined
    Aug 2008
    Posts
    1
    Location

    Slide Show view print button

    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:
    [vba]
    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
    [/vba]
    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.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    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

    [VBA]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[/VBA]
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •