D_EnablePageSetupTemplateHandle = &amp;H20000
    PSD_EnablePagePaintHook = &amp;H40000
    PSD_DisablePagePainting = &amp;H80000
End Enum


Public Enum EPageSetupUnits
    epsuInches
    epsuMillimeters
End Enum

' Common dialog errors

Private Declare Function CommDlgExtendedError Lib "COMDLG32" () As Long

Public Enum EDialogError
    CDERR_DIALOGFAILURE = &amp;HFFFF

    CDERR_GENERALCODES = &amp;H0&amp;
    CDERR_STRUCTSIZE = &amp;H1&amp;
    CDERR_INITIALIZATION = &amp;H2&amp;
    CDERR_NOTEMPLATE = &