Try:
Code:
Option Compare Database
Option Explicit
'http://msdn.microsoft.com/en-us/library/bb258176.aspx
'Declaration for the DeviceCapabilities function API call.
Private Declare Function DeviceCapabilities Lib "winspool.drv" _
Alias "DeviceCapabilitiesA" (ByVal lpsDeviceName As String, _
ByVal lpPort As String, ByVal iIndex As Long, lpOutput As Any, _
ByVal lpDevMode As Long) As Long
'DeviceCapabilities function constants.
Private Const DC_BINNAMES = 12
Private Const DC_BINS = 6
Private Const DEFAULT_VALUES = 0
Public Const DC_DUPLEX = 7
Public Sub DetectDuplexCapability()
With Application.Printer
If DeviceCapabilities(.DeviceName, .Port, DC_DUPLEX, ByVal vbNullString, 0) <> 0 Then
Debug.Print "Has duplex"
'g_blnDuplexAvailable = True
End If
End With
End Sub
I have not verified if this code reports duplex capability because the mechanical duplexing unit is actually in place or simply that the printer is designed to accept one.
I am not sure what the results I get from the DeviceCapabilities function indicate.
3 Konica printers (all have duplexer installed) and gINT PDF Exporter return 1
XPS Document Writer and Adobe PDF return 0
Office Document Image Writer returns -1
Also review
http://toddmcdermid.blogspot.com/200...d-printer.html
http://www.xtremevbtalk.com/showthread.php?t=119582