declare LONG GetDeviceCaps in gdi32.dll LONG, LONG declare SHORT DeleteDC in gdi32.dll LONG declare LONG CreateDC in gdi32.dll STRING, STRING, STRING declare INTEGER StartDoc in gdi32.dll LONG, STRING declare INTEGER StartPage in gdi32.dll LONG declare INTEGER EndPage in gdi32.dll LONG declare INTEGER EndDoc in gdi32.dll LONG .... printing job ... =EndDoc(hPrn) set print off