Postingan

Menampilkan postingan dari Oktober, 2010

Direct Printing VB

Option Explicit '----------------------------------------------------------------------------- Private Sub cmdPrint_Click() '----------------------------------------------------------------------------- Dim intLineCtr As Integer Dim intPageCtr As Integer Dim intX As Integer Dim strCustFileName As String Dim strBackSlash As String Dim intCustFileNbr As Integer Dim strFirstName As String Dim strLastName As String Dim strAddr As String Dim strCity As String Dim strState As String Dim strZip As String Const intLINE_START_POS As Integer = 6 Const intLINES_PER_PAGE As Integer = 60 ' Have the user make sure his/her printer is ready ... If MsgBox("Make sure your printer is on-line and " _ & "loaded with paper.", vbOKCancel, "Check Printer") = vbCancel _ Then Exit Sub End If ' Set the printer font to Courier, if available (otherwise, we would be ' relying on the default font for the Windows printer, which may or ' may not be set to an ...