|
-
Feb 7th, 2000, 03:02 AM
#1
Thread Starter
Member
HI!
Anyone knows how to set the windows default printer.
-
Feb 7th, 2000, 03:23 AM
#2
Lively Member
Hi
Use Printer.trackdefault Property
Good Luck
-
Feb 7th, 2000, 08:50 AM
#3
Addicted Member
You could try the following:
dim pDefault as Printer
dim pPrinter as printer
dim PrinterName as string
' Save the original default
set pDefault = Printer
' Tell it what to look for
PrinterName = "Name of the printer you want"
' Set the new default
For Each pPrinter In Printers
If pPrinter.DeviceName = PrinterName Then
Set Printer = pPrinter
End If
Next
' Restore the old default
set Printer = pDefault
-
Feb 7th, 2000, 08:38 PM
#4
Thread Starter
Member
Originally posted by HDR:
You could try the following:
dim pDefault as Printer
dim pPrinter as printer
dim PrinterName as string
' Save the original default
set pDefault = Printer
' Tell it what to look for
PrinterName = "Name of the printer you want"
' Set the new default
For Each pPrinter In Printers
If pPrinter.DeviceName = PrinterName Then
Set Printer = pPrinter
End If
Next
' Restore the old default
set Printer = pDefault
Thanks, but I need to set the system default printer.
With your code I set the default printer for my application. :-)
Thanks anyway
If you know any way to help me thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|