Set a Printer from the Printers collecti - 项目摘要 |
摘要
| 管理 |
论坛 文档
| 软件包 |
|
|
|
项目描述: |
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.
来源: http://www.freevbcode.com/ShowCode.Asp?ID=641
想为一个变量对象设置默认的打印机结果没成功。例如,给定一个安装了不止一台打印机的系统,如下的代码在打印机的默认设置中并没有改变:Set Printer = Printers(2)。预期中想得到的是文件将会打印到最初的在打印机组列中能找到的非默认的打印机。实际是这个文件打印输出到了原先默认的打印机上了。 |
类别: |
|
发布者:
cbd001
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
SetDefaultPrinter |
 1.0  |
2003-11-24 |
下载 |
|
|