Appendix A: Constants
Constants
The following are constants as defined for Visual Basic. There are equivalent constants in the Delphi units and equates in the pb/dll header files.
Errors returned by dpStartDoc
Global Const DDOC_NOHANDLES = -1
Global Const DDOC_BADFILE = -2
Global Const DDOC_FILEEXISTS = -3

Status codes returned by dpMailInit
Global Const DDOC_MAIL_SUCCESS = 0
Global Const DDOC_MAIL_FNF = 1
Global Const DDOC_MAIL_LNF = 2
Global Const DDOC_MAIL_NOH = 3
Global Const DDOC_MAIL_HEIGHT_INVALID = 4
Global Const DDOC_MAIL_WIDTH_INVALID = 5
Global Const DDOC_MAIL_LABHEIGHT_INVALID = 6
Global Const DDOC_MAIL_LABWIDTH_INVALID = 7
Global Const DDOC_MAIL_COL_INVALID = 8
Global Const DDOC_MAIL_ROW_INVALID = 9
Global Const DDOC_MAIL_LINES_INVALID = 10

Unit of measure constants as passed to dpStartDoc
Global Const DDOC_INCH = 0
Global Const DDOC_CM = 1

paper/orientation/bin parameters of dpStartDoc and dpNewPage
Global Const DDOC_SYSTEM_DEFAULT = -1
Global Const DDOC_SAME_AS_FIRST = -2
Global Const DDOC_PAPER_CUSTOM = -3   ' this only applies to paper size param

Orientation constants for use with dpStartDoc
Global Const DDOC_PORTRAIT = 0
Global Const DDOC_LANDSCAPE = 1

dpStartDoc option onstants
Global Const DDOC_VIEWBUILD = 1
Global Const DDOC_ALLOWFAX  = 2
Global Const DDOC_ALLOWMAPI = 4
Global Const DDOC_ALLOWSAVE = 8
Global Const DDOC_ZOOMWIDTH = 64
Global Const DDOC_ZOOMFIT = 128
Global Const DDOC_ZOOM75 = 256
Global Const DDOC_ZOOM100 = 512
Global Const DDOC_ZOOM125 = 1024
Global Const DDOC_SCALETEXT = 2048
Global Const DDOC_FASTTEXT = 0
Global Const DDOC_SAVE_EXE_ONLY = 4096                                                                        
Global Const DDOC_ALLOWSMTP = 8192

Font style bit-wise constants for the dpFont call
Global Const DDOC_FONTNORMAL = 0
Global Const DDOC_FONTBOLD = 1
Global Const DDOC_FONTITALIC = 2
Global Const DDOC_FONTUNDERLINE = 4
Global Const DDOC_FONTSTRIKEOUT = 8
Global Const DDOC_FONTBASELINE = 16

Paper bin constants used in dpStartDoc and dpNewPage
Global Const DDOC_BIN_UPPER = 1
Global Const DDOC_BIN_FIRST = DDOC_BIN_UPPER
Global Const DDOC_BIN_ONLYONE = 1
Global Const DDOC_BIN_LOWER = 2
Global Const DDOC_BIN_MIDDLE = 3
Global Const DDOC_BIN_MANUAL = 4
Global Const DDOC_BIN_ENVELOPE = 5
Global Const DDOC_BIN_ENVMANUAL = 6
Global Const DDOC_BIN_AUTO = 7
Global Const DDOC_BIN_TRACTOR = 8
Global Const DDOC_BIN_SMALLFMT = 9
Global Const DDOC_BIN_LARGEFMT = 10
Global Const DDOC_BIN_LARGECAPACITY = 11
Global Const DDOC_BIN_CASSETTE = 14
Global Const DDOC_BIN_LAST = DDOC_BIN_CASSETTE

Paper size constants used in dpStartDoc and dpNewPage
Global Const DDOC_PAPER_LETTER = 1           '  Letter 8  x 11"
Global Const DDOC_PAPER_LETTERSMALL = 2      '  Letter Small 8  x 11"
Global Const DDOC_PAPER_TABLOID = 3          '  Tabloid 11 x 17"
Global Const DDOC_PAPER_LEDGER = 4           '  Ledger 17 x 11"
Global Const DDOC_PAPER_LEGAL = 5            '  Legal 8  x 14"
Global Const DDOC_PAPER_STATEMENT = 6        '  Statement 5  x 8 "
Global Const DDOC_PAPER_EXECUTIVE = 7        '  Executive"7  x 10"
Global Const DDOC_PAPER_A3 = 8               '  A3 297 x 420 mm
Global Const DDOC_PAPER_A4 = 9               '  A4 210 x 297 mm
Global Const DDOC_PAPER_A4SMALL = 10         '  A4 Small 210 x 297 mm
Global Const DDOC_PAPER_A5 = 11              '  A5 148 x 210 mm
Global Const DDOC_PAPER_B4 = 12              '  B4 250 x 354
Global Const DDOC_PAPER_B5 = 13              '  B5 182 x 257 mm
Global Const DDOC_PAPER_FOLIO = 14           '  Folio 8  x 13"
Global Const DDOC_PAPER_QUARTO = 15          '  Quarto 215 x 275 mm
Global Const DDOC_PAPER_10x14 = 16           '  10x14"
Global Const DDOC_PAPER_11X17 = 17           '  11x17"
Global Const DDOC_PAPER_NOTE = 18            '  Note 8  x 11"
Global Const DDOC_ENV_9 = 19                 '  Envelope #9 3 7/8 x 8 7/8
Global Const DDOC_ENV_10 = 20                '  Envelope #10 4 1/8 x 9 
Global Const DDOC_ENV_11 = 21                '  Envelope #11 4  x 10 3/8
Global Const DDOC_ENV_12 = 22                '  Envelope #12 4 \276 x 11
Global Const DDOC_ENV_14 = 23                '  Envelope #14 5 x 11 
Global Const DDOC_ENV_DL = 27                '  Envelope DL 110 x 220mm
Global Const DDOC_ENV_C5 = 28                '  Envelope C5 162 x 229 mm
Global Const DDOC_ENV_C3 = 29                '  Envelope C3  324 x 458 mm
Global Const DDOC_ENV_C4 = 30                '  Envelope C4  229 x 324 mm
Global Const DDOC_ENV_C6 = 31                '  Envelope C6  114 x 162 mm
Global Const DDOC_ENV_C65 = 32               '  Envelope C65 114 x 229 mm
Global Const DDOC_ENV_B4 = 33                '  Envelope B4  250 x 353 mm
Global Const DDOC_ENV_B5 = 34                '  Envelope B5  176 x 250 mm
Global Const DDOC_ENV_B6 = 35                '  Envelope B6  176 x 125 mm
Global Const DDOC_ENV_ITALY = 36             '  Envelope 110 x 230 mm
Global Const DDOC_ENV_MONARCH = 37           '  Envelope Monarch 3.875 x 7.5"
Global Const DDOC_ENV_PERSONAL = 38          '  6  Envelope 3 5/8 x 6 "
Global Const DDOC_FANFOLD_US = 39           '  US Std Fanfold 14 7/8 x 11"
Global Const DDOC_FANFOLD_STD_GERMAN = 40   '  German Std Fanfold 8  x 12"
Global Const DDOC_FANFOLD_LGL_GERMAN = 41   '  German Legal Fan 8  x 13"

dpEndDoc option constants
Global Const DDOC_END_VIEW = 0
Global Const DDOC_END_PRINT = 1
Global Const DDOC_END_CLOSE = 2
Global Const DDOC_END_DELETE = 4
Global Const DDOC_END_PRINT_NODIALOG = 8
Global Const DDOC_END_FAX = 16
Global Const DDOC_END_EMAIL = 32
Global Const DDOC_END_SPECIFIC_PRINTER = 64

Text alignment constants for dpText, dpPageNo, dpPageCount
Global Const DDOC_LEFT = 0
Global Const DDOC_CENTER = 1
Global Const DDOC_RIGHT = 2
Global Const DDOC_DECIMAL = 3

Return constants for dpSelfExtract
Global Const DDOC_INPUT_NOT_FOUND         = -5
Global Const DDOC_OUTPUT_EXISTS           = -4
Global Const DDOC_ERR_OPEN_INPUT          = -3
Global Const DDOC_ERROR_OPEN_OUTPUT       = -2
Global Const DDOC_ERROR_OPEN_STUB         = -1
Global Const DDOC_SUCCESS                 =  0

Word substitution constants as used in dpChangeWords
Global Const DDOC_MENU_FILE = 1        ' File Menu
Global Const DDOC_MENU_DOC = 2         ' Document Menu
Global Const DDOC_BTN_EXIT = 3         ' Exit button hint and exit menu
Global Const DDOC_BTN_FIRST = 4        ' First Button hint and menu
Global Const DDOC_BTN_PREV = 5         ' Previous Button hint and menu
Global Const DDOC_BTN_NEXT = 6         ' Next button hint and menu
Global Const DDOC_BTN_LAST = 7         ' Last Button hint and menu
Global Const DDOC_BTN_JUMP = 8         ' Jump Button hint and menu
Global Const DDOC_BTN_PRINT = 9        ' Print hint and menu
Global Const DDOC_WORD_ZOOM = 10       ' Zoom label caption
Global Const DDOC_WORD_ZOOMFIT = 11    ' Zoom Fit word in drop down
Global Const DDOC_WORD_ZOOMWIDTH = 12  ' Zoom Width in drop down
Global Const DDOC_WORD_DOCINDEX = 13   ' Word Document index
Global Const DDOC_WORD_PAGE = 14       ' Page
Global Const DDOC_WORD_OF = 15         ' of
Global Const DDOC_DLG_JUMP_TITLE = 16  ' jump dialog title
Global Const DDOC_DLG_JUMP_TEXT = 17   ' dialog jump text
Global Const DDOC_BTN_CANCEL = 18      ' cancel button
Global Const DDOC_BTN_OK = 19          ' ok button
Global Const DDOC_DLG_PW_TITLE = 20    ' password box title
Global Const DDOC_DLG_PW_TEXT = 21     ' password text in dialog
Global Const DDOC_DLG_PW_INVALID = 22  ' password is invalid (try again)
Global Const DDOC_DLG_PW_CANCEL = 23   ' too many tries
Global Const %DDOC_BTN_FAX = 25        ' fax button
Global Const DDOC_BTN_SAVE = 26     ' save button