Tools Links Login

Set a Printer as default from Printers collection

Attempting to set the default printer to an object variable has no effect. For instance, given a system with more than one printer installed, the following code will not change the default printer: Set Printer = Printers(2). The expected behavior is that the document should print to the first non-default printer found in the printers collection. The actual behavior is that the document prints to the original default printer. Thus, a fix was proposed in MSDN Article ID Q167735. I modified this code from it original and wrapped in a class for the purpose of storing the original printer configuration during class initialization and reseting it back during termination if it was modified.

Original Author: Vincent Lozada

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 78 times

Categories

Visual Basic 6

Attachments

CODE_UPLOAD260212281999.zip
Posted: 9/3/2020 3:45:00 PM
Size: 6,726 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.