Get/Set Default printer - Looking for code samples or Tips 
Author Message
 Get/Set Default printer - Looking for code samples or Tips

Does anyone have any code sample to get and set the Default Printer.

I want to change the Default Printer in a program and set it back.

I could probably code this if I knew an easy way to get the index of the
default printer in the printers collection.

The help show the following for referencing a Printer Object via the
Printers Collection.
=====================
Printers(index)
The index placeholder represents an integer with a range from 0 to
Printers.Count-1.
---------
Note   If you use the Printers collection to specify a particular printer,
as in Printers(3),.....
=====================

Is there any way to find out what the "index" number is of the Default
printer?

Thanks in advance!

--
** To email me, remove the 'X' from my email address **
NO JUNK SPAM MAIL PLEASE!



Fri, 15 Sep 2000 03:00:00 GMT  
 Get/Set Default printer - Looking for code samples or Tips

Using the DeviceName property of the Printer object, you could see which
printer if first selected, then change it, and then restore it (navigating
in the printers conllection).

Hope this help,
========================================
Pedro J. Rusjan

WEB: http://www.mug.org.ar/socios/pedro.rusjan
========================================


Quote:
>Does anyone have any code sample to get and set the Default Printer.

>I want to change the Default Printer in a program and set it back.

>I could probably code this if I knew an easy way to get the index of the
>default printer in the printers collection.

>The help show the following for referencing a Printer Object via the
>Printers Collection.
>=====================
>Printers(index)
>The index placeholder represents an integer with a range from 0 to
>Printers.Count-1.
>---------
>Note   If you use the Printers collection to specify a particular printer,
>as in Printers(3),.....
>=====================

>Is there any way to find out what the "index" number is of the Default
>printer?

>Thanks in advance!

>--
>** To email me, remove the 'X' from my email address **
>NO JUNK SPAM MAIL PLEASE!



Fri, 15 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Get/Set Default printer - Looking for code samples or Tips

2. Getting Printers and setting default

3. Code to set default printer

4. How to set default printer in VBA code??

5. How to set default printer in VBA code?

6. Set default printer by code

7. setting/changing default printer via code (VBA)

8. Set default printer by code

9. Setting the default printer in code

10. Set Default Printer by Visual basic Code

11. Set Default Printer by Visual basic Code

12. Getting default printer name from Printers Collection

 

 
Powered by phpBB® Forum Software