Anyone know how to open printer preferences ?
Printable View
Anyone know how to open printer preferences ?
Use the commondialog control and call the .ShowPrinter method.
I am not using common dialog. I able to display the printer devices in the combo box. Let say, I choose the printer A from combo box. How to show its printer preferences?I want to print as grayscale
Code:'Add all the available printers to the combo box
Combo7.Clear
For i% = 0 To Printers.Count - 1
Combo7.AddItem Printers(i%).DeviceName
Next i%
'Display the default printer
For i% = 0 To Combo7.ListCount - 1
If Combo7.List(i%) = Printer.DeviceName Then
Combo7.ListIndex = i%
Exit For
End If
Next i%
This will set grayscale.
Code:Printer.ColorMode = vbPRCMMonochrome
How to used default colourmode with black and colour.
Code:Dim p As Printer
For Each p In Printers
If p.DeviceName = Text9.Text And Option1.Value = False Then 'If grayscale colour not set
Set Printer = p:
Exit For
ElseIf p.DeviceName = Text9.Text And Option1.Value = True Then 'If grayscale colour is set
p.ColorMode = vbPRCMMonochrome
Set Printer = p:
Exit For
End If
Next
Use vbPRCMColor to specify color mode.
Why This doesnt work?
It always show this when I choose the print from combo. "Debug.Print p.DeviceName & " colormode is MONOCHROME" .
Why it not print this message "p.DeviceName & " colormode is COLOR""
Code:
Private Sub Command1_Click()
Dim p As Printer
For Each p In Printers
If p.DeviceName = Combo1.Text And p.ColorMode = vbPRCMColor Then
Set Printer = p:
MsgBox "HI"
Debug.Print p.DeviceName & " colormode is COLOR"
Printer.EndDoc
Exit For
ElseIf p.DeviceName = Combo1.Text And p.ColorMode = vbPRCMMonochrome Then
Set Printer = p:
Debug.Print p.DeviceName & " colormode is MONOCHROME"
Printer.EndDoc
Exit For
End If
Next
End Sub
Does your printer support color mode? Are you trying to set the color mode of a virtual printer like the MS Office Document Image Writter?
How I know the whether my printer support color mode or not?I have set the printer properties as color,why when I choose that printer it not print the message like this "Debug.Print p.DeviceName & " colormode is COLOR"
"?My printer can print a color when I print from Microsoft Word.:confused:
I have set the option true. Why it print the paper with color?
Code:Dim p As Printer
For Each p In Printers
If p.DeviceName = Text9.Text And Option1.Value = False Then 'If grayscale not set
Printer.ColorMode = vbPRCMColor
Set Printer = p:
Exit For
ElseIf p.DeviceName = Text9.Text And Option1.Value = True Then 'If grayscale is set
Printer.ColorMode = vbPRCMMonochrome
Set Printer = p:
Exit For
End If
Next
Maybe your not typeing in the correct DeviceName so it wont match?