kasslaw
asked on
Modify Printer Preferences
I am looking to modify a printers printing preferences via VB6 programming. If I need to use vb6 to call another application to do so, this would be an acceptable solution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
One of the items I need to modify is bin selection. Of course this will vary from printer to printer. Am I able to do this with either of these solutions?
Add this code to above module.
'Example usage
SetSource "HP Deskjet F4100 series", DMBIN_LOWER
'Example usage
SetSource "HP Deskjet F4100 series", DMBIN_LOWER
Private Const DM_DEFAULTSOURCE As Long = &H200&
Public Enum eDMDefaultSource
DMBIN_UPPER = 1
DMBIN_ONLYONE = 1
DMBIN_LOWER = 2
DMBIN_MIDDLE = 3
DMBIN_MANUAL = 4
DMBIN_ENVELOPE = 5
DMBIN_ENVMANUAL = 6
DMBIN_AUTO = 7
DMBIN_TRACTOR = 8
DMBIN_SMALLFMT = 9
DMBIN_LARGEFMT = 10
DMBIN_LARGECAPACITY = 11
DMBIN_CASSETTE = 14
DMBIN_USER = 256
End Enum
Public Function SetSource(ByVal DeviceName As String, iSource As Long)
SetSource = SetPrinterProperty(DeviceName, DM_DEFAULTSOURCE, iOrientation)
End Function
Oops, typo. It should be:
Public Function SetSource(ByVal DeviceName As String, iSource As Long)
SetSource = SetPrinterProperty(DeviceN ame, DM_DEFAULTSOURCE, iSource)
End Function
Public Function SetSource(ByVal DeviceName As String, iSource As Long)
SetSource = SetPrinterProperty(DeviceN
End Function
When you pull up the printer object click on the property button and you will have access to the bin and much more.
http://www.freevbcode.com/ShowCode.asp?ID=3646
http://support.microsoft.com/default.aspx?scid=KB;en-us;q266767