MS Access - Export Page Settings

坚强是说给别人听的谎言 提交于 2020-01-04 13:40:47

问题


I develop an application for printing Labels. We will use it on many workstations with different printers. MS Access remembers the Page Setup Settings for each Report / Printer. Is there a way to export the Page Setup Settings?

If i write an Update, i have to setup every Report for every Printer again.


回答1:


You can export printer settings. But you should probably adjust your database to store printer preferences per machine or per machine per report in a table, so each machine can have different printing preferences.

You can export report printer by storing different properties of the Report.Printer object.

The main ones are:

Reports!SomeReport.Printer.DeviceName
Reports!SomeReport.Printer.PaperSize
Reports!SomeReport.Printer.PaperBin

To set a printer for a report, you can use:

Set Reports!SomeReport.Printer = Application.Printers("PrinterDeviceName")

You can set PaperSize And PaperBin by just setting the properties.

You can find some advanced documentation on working with printers in this Microsoft Docs document. Note that, for me, this needed some adjustment to be able to handle printers with no trays (some virtual PDF printers).



来源:https://stackoverflow.com/questions/51943882/ms-access-export-page-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!