Article ID: 284286 - View products that this article applies to.
This article was previously published under Q284286
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.accdb and.mdb) and to a Microsoft Access project (.adp).
This article shows you how to reset the Application.Printer object to its default settings after you have customized them.
The following sample code demonstrates how to print the Catalog report in the Northwind Sample Database. It changes some of the default printer settings and when the print job is completed, the code reset the printer to the default settings.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Note Not all printers and printer drivers support the functionality in the following sample code.
Note In Microsoft Office Access 2007, you only have to replace the report name "Catalog" with an available report for the sample code..
When the print job is completed, this code will clear out the current settings and reset the global Application.Printer object to the default application printer.
Contact us for more help
Connect with Answer Desk for expert help.