Código
Private Sub CmdPrintSave_Click() On Error GoTo Err Dim TITLE01 As String Dim TITLE02 As String Dim TITLE03 As String Dim TITLE04 As String Dim TITLE05 As String Dim TITLE06 As String Dim TITLE07 As String Dim TITLE08 As String Dim TITLE09 As String Dim TITLE10 As String Dim TITLE11 As String Dim TITLE12 As String Dim TempDinero01 As String * 6 Dim TempDinero02 As String * 6 Dim TempDinero03 As String * 6 Dim TempDinero04 As String * 6 Dim TextoExtra As String Dim TextoExtraDiferenciado As String Dim NombreExtra As String Dim NombreExtraDiferenciado As String If MsgBox("¿DESEA IMPRIMIR Y GUARDAR EL RECIBO ACTUAL?", vbQuestion + vbYesNo, App.Title) = vbYes Then TITLE01 = 41 - Len(MTrim(SCHOOLNAME)) TITLE02 = TITLE01 / 2 TITLE03 = 41 - Len(MTrim(DIRECTION)) TITLE04 = TITLE03 / 2 TITLE05 = 41 - Len(MTrim(RESOLUTION)) TITLE06 = TITLE05 / 2 TITLE07 = 41 - Len(MTrim(PHONES)) TITLE08 = TITLE07 / 2 Printer.FontName = "Consolas" Printer.FontSize = 9 Printer.FontBold = False '----------AQUI TIRRA EL ERRORR--------------- Printer.PaintPicture LoadPicture(App.Path & "\images\logo.jpg"), 0, 0, 128, 43 '----------AQUI TIRRA EL ERRORR--------------- Printer.Print Space(TITLE02) & MTrim(SCHOOLNAME) Printer.Print Space(TITLE04) & MTrim(DIRECTION) Printer.Print Space(TITLE06) & MTrim(RESOLUTION) Printer.Print Space(TITLE08) & MTrim(PHONES) Printer.Print String(11, Chr(45)) & "[ DATOS PERSONALES ]" & String(11, Chr(45)) Printer.Print "NOMBRE:" If Len(LblNombre_Alumno.Caption) > 41 Then NombreExtraDiferenciado = Len(LblNombre_Alumno.Caption) - 41 NombreExtra = Right(LblNombre_Alumno.Caption, CLng(TextoExtraDiferenciado)) Printer.Print MTrim(LblNombre_Alumno.Caption) '<-Nombre del estudiante Printer.Print MTrim(NombreExtra) '<-Nombre del estudiante Else Printer.Print MTrim(LblNombre_Alumno.Caption) End If Printer.Print Printer.Print "CÓDIGO PERSONAL:" & Space(17) & "CARNÉ #:" '<-COL33 Printer.Print Space(4) & MTrim(LblCod_Personal.Caption) & Space(23) & MTrim(LblNOCarne.Caption) '<-Código Personal y # de Carné Printer.Print String(41, Chr(61)) Printer.Print Printer.Print String(7, Chr(45)) & "[ DESCRIPCIÓN DEL RECIBO ]" & String(8, Chr(45)) If ChkPagoInscripcion.value = 1 Then TempDinero01 = Len(TxtImporte01.Text) TITLE09 = 6 - TempDinero01 Printer.Print "PAGO INSCRIPCIÓN" & String(17, ".") & "Q " & Space(TITLE09) & TxtImporte01.Text '<-Pago Inscripción End If If ChkPagoColegiatura.value = 1 Then TempDinero02 = Len(TxtImporte02.Text) TITLE10 = 6 - TempDinero02 Printer.Print "PAGO COLEGIATURA" & String(17, ".") & "Q " & Space(TITLE10) & TxtImporte02.Text '<-Pago Colegiatura Printer.Print Space(5) & "MES: [ " & CboMeses.Text & " ]" End If If ChkOtros.value = 1 Then TempDinero03 = Len(TxtImporte03.Text) TITLE11 = 6 - TempDinero03 Printer.Print "OTROS PAGOS" & String(22, ".") & "Q " & Space(TITLE11) & TxtImporte03.Text '<-Otros pagos Printer.Print MTrim(TxtDescripcionPago.Text) End If TempDinero04 = Len(LblTotal.Caption) TITLE12 = 6 - TempDinero04 Printer.Print Space(9); "TOTAL A PAGAR" & String(11, ".") & "Q " & Space(TITLE12) & LblTotal.Caption '<-Dinero a pagar Printer.Print Printer.Print "EN LETRAS:" If Len(LblImporteenLetras.Caption) > 41 Then TextoExtraDiferenciado = Len(LblImporteenLetras.Caption) - 41 TextoExtra = Right(LblImporteenLetras.Caption, CLng(TextoExtraDiferenciado)) Printer.Print MTrim(LblImporteenLetras.Caption) '<-Importe en letras Printer.Print MTrim(TextoExtra) '<-Importe en letras Else Printer.Print MTrim(LblImporteenLetras.Caption) '<-Importe en letras End If Printer.Print String(41, Chr(61)) Printer.Print Printer.Print Printer.Print Printer.Print Printer.Print Printer.Print Printer.Print Printer.Print Space(4) & String(33, Chr(45)) & Space(4) Printer.Print Space(5) & "FIRMA Y SELLO DEL ADMINISTRADOR" & Space(5) Printer.Print Space(4) & "COMPROBANTE DE PAGO, NO CONTABLE" Printer.Print Printer.Print Space(11) & "GRACIAS POR SU PAGO" & Space(11) Printer.Print Printer.Print "[ " & Format(Now, "Short Date") & "-" & Format(Now, "Short Time") & " ]" & "[ RECIBO #: " & MTrim(LblNORecibo.Caption) & " ]" Printer.EndDoc
es una epson tm-20ii, gracias
Mod: No escribir en mayúsculas