|
-
Dec 25th, 2007, 11:28 AM
#1
Thread Starter
Frenzied Member
Printer Preferences
Anyone know how to open printer preferences ?
-
Dec 25th, 2007, 12:21 PM
#2
Re: Printer Preferences
Use the commondialog control and call the .ShowPrinter method.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 25th, 2007, 01:19 PM
#3
Thread Starter
Frenzied Member
Re: Printer Preferences
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%
-
Dec 25th, 2007, 01:25 PM
#4
Re: Printer Preferences
This will set grayscale.
Code:
Printer.ColorMode = vbPRCMMonochrome
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 25th, 2007, 09:42 PM
#5
Thread Starter
Frenzied Member
Re: Printer Preferences
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
-
Dec 26th, 2007, 01:43 AM
#6
Re: Printer Preferences
Use vbPRCMColor to specify color mode.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 26th, 2007, 01:55 AM
#7
Thread Starter
Frenzied Member
Re: Printer Preferences
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
-
Dec 26th, 2007, 01:58 AM
#8
Re: Printer Preferences
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?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 26th, 2007, 02:03 AM
#9
Thread Starter
Frenzied Member
Re: Printer Preferences
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.
-
Dec 26th, 2007, 02:07 AM
#10
Thread Starter
Frenzied Member
Re: Printer Preferences
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
-
Dec 26th, 2007, 12:09 PM
#11
Re: Printer Preferences
Maybe your not typeing in the correct DeviceName so it wont match?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
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
|