Results for "Author: vincent lozada"
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.
I started this project nearly a year ago to provide printing and print-previewing in my applications. This project has a lot of room for improvement, so my hope is that you can take this project and run with it for I have limited time to develop it any further. The project has two dependencies: SSubtmr.dll and Win.tlb (large file). When you un-zip the file, please pay close attention to these dependencies in order to make the project work. Credit goes to Steve McMahon and Bruce McKinney for these libraries. Get them here: http://vbaccelerator.com/codelib/ssubtmr/ssubtmr.zip http://www.twocyclones.com/Files/Win.zip