ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting printer paper (https://www.excelbanter.com/excel-programming/279991-setting-printer-paper.html)

smi

Setting printer paper
 
Hello,

Thank you very much for your time for helping me in the past. I have a
question and I can not find any where in the Google search or book....
I need to use VBA to set the paper custom length and width for my printing.
Width = 6.5 inches
Length = 8.5 inches

Long



Tom Ogilvy

Setting printer paper
 
KeepitCool posted this in response to a similar question yesterday:

--------
Mike,

Manipulating the printer settings from the registry is
rather complicated.

It depends on operating system etc etc. A while back i've written an
experimental addin MultiTrayPrint to switch printertrays.

Although unused in the interface a lot of background stuff
(like papersizes, bin to size mapping, etc etc) has been
programmed into classmodules in the addin, and you may be able
to use / adapt it to suit your needs.

The code is NOT documented.. but fairly structered.
It involves some 15 API functions and may be instructive.

Download it from my site and have a look.
http://members.chello.nl/keepitcool/download.html


Any comments appreciated!



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool

--
Regards,
Tom Ogilvy

smi wrote in message
...
Hello,

Thank you very much for your time for helping me in the past. I have a
question and I can not find any where in the Google search or book....
I need to use VBA to set the paper custom length and width for my

printing.
Width = 6.5 inches
Length = 8.5 inches

Long





Bernard V Liengme[_3_]

Setting printer paper
 
I suggest you use a new workbook and record a macro that does this.
Then edit the subroutine and place in your application.
Bernard

"smi" wrote in message
...
Hello,

Thank you very much for your time for helping me in the past. I have a
question and I can not find any where in the Google search or book....
I need to use VBA to set the paper custom length and width for my

printing.
Width = 6.5 inches
Length = 8.5 inches

Long





Tom Ogilvy

Setting printer paper
 
custom page size is set in the print options dialog, so it wouldn't be
recorded as it isn't an excel action.

--
Regards,
Tom Ogilvy

Bernard V Liengme wrote in message
...
I suggest you use a new workbook and record a macro that does this.
Then edit the subroutine and place in your application.
Bernard

"smi" wrote in message
...
Hello,

Thank you very much for your time for helping me in the past. I have a
question and I can not find any where in the Google search or book....
I need to use VBA to set the paper custom length and width for my

printing.
Width = 6.5 inches
Length = 8.5 inches

Long








All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com