A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

macro to change print options



 
 
Thread Tools Display Modes
  #1  
Old March 5th, 2007, 03:46 PM posted to microsoft.public.powerpoint
sherobot
external usenet poster
 
Posts: 49
Default macro to change print options

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
  #2  
Old March 5th, 2007, 04:01 PM posted to microsoft.public.powerpoint
David M. Marcovitz
external usenet poster
 
Posts: 1,267
Default macro to change print options

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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote in
:

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


  #3  
Old March 5th, 2007, 04:24 PM posted to microsoft.public.powerpoint
sherobot
external usenet poster
 
Posts: 49
Default macro to change print options

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

"David M. Marcovitz" wrote:

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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote in
:

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



  #4  
Old March 5th, 2007, 04:44 PM posted to microsoft.public.powerpoint
David M. Marcovitz
external usenet poster
 
Posts: 1,267
Default macro to change print options

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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote in
:

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

"David M. Marcovitz" wrote:

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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote
in :

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





  #5  
Old March 5th, 2007, 06:59 PM posted to microsoft.public.powerpoint
Bill Dilworth
external usenet poster
 
Posts: 1,455
Default macro to change print options

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...isualbasic.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
..



"David M. Marcovitz" wrote in message
48.16...
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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote in
:

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

"David M. Marcovitz" wrote:

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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote
in :

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







  #6  
Old March 5th, 2007, 08:31 PM posted to microsoft.public.powerpoint
sherobot
external usenet poster
 
Posts: 49
Default macro to change print options

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.
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





"Bill Dilworth" wrote:

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...isualbasic.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
..



"David M. Marcovitz" wrote in message
48.16...
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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote in
:

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

"David M. Marcovitz" wrote:

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/

=?Utf-8?B?c2hlcm9ib3Q=?= wrote
in :

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








  #7  
Old March 5th, 2007, 11:07 PM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default macro to change print options

In article , Sherobot
wrote:
This may help:

http://pubs.logicalexpressions.com/p...cle.asp?ID=101

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


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.