Optional PrintQuality As EPrintQuality = epqDraft, _
        Optional Units As EPageSetupUnits = epsuInches, _
        Optional Printer As Object, _
        Optional flags As Long, _
        Optional Hook As Boolean = False, _
        Optional EventSink As Object _
    ) As Boolean
Dim afFlags As Long, afMask As Long
        
    m_lApiReturn = 0
    m_lExtendedError = 0
    ' Mask out unwanted bits
    afMask = Not (PSD_EnablePagePaintHook Or _
                  PSD_EnablePageSetupHook Or _
               