Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS Access: custom paper size

I am building a MS Access (2010) application and I'll be printing barcode labels from this application. There are a variety of other reports and forms which will also be printed, using the standard printer settings, however with the barcodes I need it to print to a specific printer, and have to set it to use a special page size.

In my searching I have found the printer object's property "Papersize" which itself has quite a few 'standard' default options including acPRPSLetter for the standard US Letter at 8.5" x 11" and acPRPSA4 for the A4 paper size. None of the preset sizes will work for my use. There is one preset which represents a user custom size, acPRPSUser, but I have not found any way to programmatically set the custom size.

I did read about how there are the '.height' and '.width' properties of the printer, but it does not appear that they exist in the VB used for Access 2010 (I believe it is based on VB6).

Can anyone help me set a custom paper size using VB code in Access 2010?

like image 253
CertifiedKennedy Avatar asked Jul 04 '12 21:07

CertifiedKennedy


Video Answer


1 Answers

There is no need for VBA. You can set all page settings for margins, orientation, paper, printer and columns by using the page settings command from the menu: Tools for report designs > Page settings > Page settings > Page > Paper > Size, or > Page > Printer for ReportName > Use specific printer > Printer > Properties. These settings are saved for each induvidual report.

Screenshot

like image 100
NGLN Avatar answered Sep 22 '22 08:09

NGLN