Setting printer paper

  • Thread starter Thread starter smi
  • Start date Start date
S

smi

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
 
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 >
 
I suggest you use a new workbook and record a macro that does this.
Then edit the subroutine and place in your application.
Bernard
 
custom page size is set in the print options dialog, so it wouldn't be
recorded as it isn't an excel action.
 
Back
Top