printing macro

G

Guest

What's the code for printing automatically on the default printer from Power
point via Macro

I wrote this code:

Sub printer()

With ActivePresentation.PrintOptions
.RangeType = ppPrintCurrent
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
End With
ActivePresentation.PrintOut
End Sub

this code work only on my computer, and only in his first running
 
G

Guest

As far as i can see that should work OK and print only the current slide in a
presentation.
It may not work on other computers because the macro security setting is at
"high" or they are using the viewer instead of the full powerpoint
application.
--

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
 
D

David M. Marcovitz

As John said, the likely problem on other people's computers is that
their macro security is not set to medium or low so they never run the
macro. I could not get this to fail, except that the first few times I
ran it, it printed slide 1 instead of slide 3 (where I had the button to
print).

You probably don't need quite so much code. You could try simplifying it
by cutting out all the lines (other than the .RangeType line) between the
With and the End With. I doubt that would make a difference, but those
settings you set with the other lines are generally default settings.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
S

Steve Rindsberg

מירי said:
What's the code for printing automatically on the default printer from Power
point via Macro

I wrote this code:

Sub printer()

With ActivePresentation.PrintOptions
.RangeType = ppPrintCurrent
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
End With
ActivePresentation.PrintOut
End Sub

this code work only on my computer, and only in his first running

What happens the second time?

What happens on other computers?
 

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