printing macro

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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/
 
מירי 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?
 
Back
Top