问题
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