printing VBScript

J

Joey

We are using Powerpoint 2002 to provide a slide show. We would like to add a
print button on one of the pages so that the customer can print the current
page. I have created the print button but the VBScript that I am using is
not working. Everything else seems to be working, just need a small
VBScript to attach to the print button that will print the current display.
Any help is appreciated.
 
J

John Wilson

Hi Joey

This is the basic script for printing the current slide

Sub printit()
With ActivePresentation.PrintOptions
..OutputType = ppPrintOutputSlides
..RangeType = ppPrintCurrent
End With
ActivePresentation.PrintOut
End Sub

You may have to add more if eg it's not the default printer or paper tray
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 
J

Joey

I am currently using the code listed below, but there are two issues:
1. It prints on my computer, but not consistantly on other systems.
2. It only prints the 1st slide, even though the code is on slide 26 and
we need slide 26 to print.

Sub printit()
With ActivePresentation.PrintOptions
..OutputType = ppPrintOutputSlides
..RangeType = ppPrintCurrent
End With
ActivePresentation.PrintOut
End Sub
 
D

David M. Marcovitz

Try using:

ActivePresentation.PrintOut From:=26, To:=26

That will just print slide 26. As far as it not working on every
computer, this will print to your current default printer. It should
work the same as going to the File menu and choosing Print and not
channging any of the settings, except which slides to print. Perhaps,
those computers need some extra intervention when printing normally.

--David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top