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
John Wilson - 06 Aug 2006 07:54 GMT
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.

Signature
Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
> What's the code for printing automatically on the default printer from Power
> point via Macro
[quoted text clipped - 17 lines]
>
> this code work only on my computer, and only in his first running
David M. Marcovitz - 07 Aug 2006 15:11 GMT
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

Signature
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/
=?Utf-8?B?157Xmdeo15k=?= <@discussions.microsoft.com> wrote in
news:61B7CF35-1E45-4FA2-9C04-890CDAE20773@microsoft.com:
> What's the code for printing automatically on the default printer from
> Power point via Macro
[quoted text clipped - 17 lines]
>
> this code work only on my computer, and only in his first running
Steve Rindsberg - 07 Aug 2006 21:29 GMT
> What's the code for printing automatically on the default printer from Power
> point via Macro
[quoted text clipped - 17 lines]
>
> this code work only on my computer, and only in his first running
What happens the second time?
What happens on other computers?
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================