Set Report Papersize to XP Form in VBA - Access 2003

S

sylmart7

I really need help with this issue. I know I can set the Papersize of
a report in VBA by using the following code in the Report's On Open
event:

Dim prtDefault As Printer

prtDefault.PaperSize = acPRPSLetter

I also know, in Windows XP, that I can create a custom Paper Size by
going to Printers & Faxes, File, Server Properties, Create a New Form.
This Paper Size will then appear in the drop-down list of Paper Sizes
for printers that can accept it.

My question is:

How, in VBA, do I set the Paper Size I defined in XP Server Properties
as the Paper Size for an Access 2003 report?

Dim prtDefault As Printer

prtDefault.PaperSize = ?

I'm guessing I may need to use API calls, but I could really use a
pointer in the right direction. If you can help, please post! Thanks
in advance.
 
B

Br@dley

sylmart7 said:
I really need help with this issue. I know I can set the Papersize of
a report in VBA by using the following code in the Report's On Open
event:

Dim prtDefault As Printer

prtDefault.PaperSize = acPRPSLetter

I also know, in Windows XP, that I can create a custom Paper Size by
going to Printers & Faxes, File, Server Properties, Create a New Form.
This Paper Size will then appear in the drop-down list of Paper Sizes
for printers that can accept it.

My question is:

How, in VBA, do I set the Paper Size I defined in XP Server Properties
as the Paper Size for an Access 2003 report?

Dim prtDefault As Printer

prtDefault.PaperSize = ?

I'm guessing I may need to use API calls, but I could really use a
pointer in the right direction. If you can help, please post! Thanks
in advance.


Perhaps elaborating on the "why" may help here. Why do you need to
dynamically generate a report with a page size to fit the printer's
setting?
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
 

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