Setting Paper size via code for reports

E

EddyLLC

I'm trying to print a report in Access 2003 to a preprinted form that is not
standard size. The forms size is 8 7/8 by 8 1/2. The printer is a dot
matrix tractor feed and after the first report prints the paper is feed as if
the form is a standard size so the second and subsequent reports are not
aligned correctly. I checked the printers properties thinking I could set it
to a "User Defined" or "Custom" paper size but neither option was available
in the list. Is there a way to set the paper size via code so the printer
will page feed correctly?

Thanks so much for any help.
Eddy
 
G

Guest

Wel I could only gave the solution found in my inquiry in this site and it
goes as folows:

"Oh I may found a solution from Tony Toews from 2001 which I already tried on
the server.
The driver now contains the custom made form I created.
Hopefully it works :)

Quote Tony Toews, Microsoft Access MVP :

You will likely need to create a custom paper size as that printer driver
likely
doesn't support changing just the paper length and width.

This is an OS dependent function. If Win2K (likely Win XP as well) go to
Settings >>
Printers from your Start menu on the print server. (This might work, or
might not,
on your own system as well.) Then click on File >> Server Properties. You
will
then see a screen showing Forms. Create a new Form here with your own name
and your
form sizes.


Then go into the report design view in Access. In A97 click on File >> Page
Setup >>
Page tab and change the Paper Size to the above created form name as well as
the
destination pritner.


Note that if you change the the printer name in the future you will also
lose this
Custom Paper Size.


Also if you want to print this report to multiple dot matrix printers you
will need
to do extensive mucking about with PrtDevMode but I'll leave that discussion
for
later if you require it. There is an undocumented feature you need to know
about
which isn't in any KB article or any of the Developers Handbooks.


Tony
----
Tony Toews, Microsoft Access MVP"


I try it and it works.
I hope it will help to you to.

Regards, Viktor
 

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

Top