macro to change print options

G

Guest

I'm trying to write a macro that will select tabloid for paper size and
duplex for style of printing. When I do a macro by selecting the print
options, I have to go to the properties box for more options. Once I select
those options I then stop the macro. When I look at the code it doesn't have
the tabloid coding or the duplex coding. Does anyone know the coding for
this? It works originally, but if I print a different size document and then
go back to a document that I need to be duplexed it print outs what was last
printed.
Here's my code.
With ActivePresentation.PrintOptions
.RangeType = ppPrintAll
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
.ActivePrinter = "IKON2"
End With
ActivePresentation.PrintOut
End Sub
 
D

David M. Marcovitz

I'm not sure, but I am guessing that you won't be able to do this because
those properties are not PowerPoint properties but rather properties of
your printer driver.
--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/
 
G

Guest

Hmmm, I was thinking that too. But macros can call other applications, is
there code for it to call the print driver?
 
D

David M. Marcovitz

We're getting way beyond my expertise so I might be out of line, but
generally, macros interacting with other applications can happen when
those other applications also have a VBA object model. For example, a
macro can interact with Excel because you could write code directly in
Excel, but I don't think you can do anything (other than perhaps open a
document) with VBA in, for example, Adobe Photoshop.
--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/
 
B

Bill Dilworth

You can use API calls from VBA to ask the Windows operating system to do
things for you. I do not know the actual API calls to set the printer
values, but knowing these terms should get you a start.

http://www.daneprairie.com/doc/index.html?visualbasic.htm might also help a
bit.


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 
G

Guest

ok that seems very complicated though.
Do the API calls have to have a separate module created? Then how do i find
out the code for printing tabloid and duplex?
Where do i put the API calls in my vb code?
Here's my code.
 

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

Similar Threads


Top