Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  IniRel
  2.    
  3.     Dim pag As Boolean
  4.     Dim a As Single
  5.     Dim vComplemento As String
  6.     Dim ValorTotal As Currency
  7.     Dim AtualizadoTotal As Currency
  8.     Dim vQtdPlanos As Single
  9.     Dim ano_extenso As Variant
  10.    
  11.     ValorTotal = 0
  12.    
  13.  ' Busca pelo arquivo rtf para a impressão
  14.    If Existe(atual & "\PROMISSORIA.rtf") Then
  15.         rtb.LoadFile atual & "\PROMISSORIA.rtf"
  16.       Else
  17.         MsgBox "Arquivo PROMISSORIA.rtf não encontrado em " & atual, vbCritical, App.ProductName
  18.     End If
  19.  
  20. ' Inicia o processo de impressão das informações
  21.    ano_extenso = Split(Mid(frmLançamento.Mask(0).Text, 4, 4), "reais")
  22.    
  23.     rtb.TextRTF = Replace(rtb.TextRTF, "#descricao#", frmLançamento.Text1(0).Text, 1)
  24.     rtb.TextRTF = Replace(rtb.TextRTF, "#valor#", Format(frmLançamento.Mask(1).Text, "Currency"), 1)
  25.     rtb.TextRTF = Replace(rtb.TextRTF, "#dia#", NaoNull(frmCadAluno.datPrimaryRS(0).Recordset!dia), 1)
  26.     rtb.TextRTF = Replace(rtb.TextRTF, "#mes#", Mes_Nome(Mid(frmLançamento.Mask(0).Text, 1, 2)), 1)
  27.     rtb.TextRTF = Replace(rtb.TextRTF, "#ano#", ano_extenso(0), 1)
  28.     rtb.TextRTF = Replace(rtb.TextRTF, "#empresa#", DadosEmpresa("razao"), 1)
  29.     rtb.TextRTF = Replace(rtb.TextRTF, "#cnpj#", Format(DadosEmpresa("cgc"), "000 000 000/0000-00"), 1)
  30.     rtb.TextRTF = Replace(rtb.TextRTF, "#valorext#", UCase(PassaExtenso(Val(frmLançamento.Mask(1).Text))), 1)
  31.     rtb.TextRTF = Replace(rtb.TextRTF, "#enderecoempresa#", DadosEmpresa("endereco") & " - " & DadosEmpresa("bairro") & " - " & DadosEmpresa("cidade"), 1)
  32.     rtb.TextRTF = Replace(rtb.TextRTF, "#emissao#", Date, 1)
  33.     rtb.TextRTF = Replace(rtb.TextRTF, "#nome#", NaoNull(frmCadAluno.datPrimaryRS(0).Recordset!nome), 1)
  34.    
  35.     If Len(frmCadAluno.datPrimaryRS(0).Recordset!cgc) = 11 Then
  36.         rtb.TextRTF = Replace(rtb.TextRTF, "#cpf#", Format(NaoNull(frmCadAluno.datPrimaryRS(0).Recordset!cgc), "000 000 000-00"), 1)
  37.       Else
  38.         rtb.TextRTF = Replace(rtb.TextRTF, "#cpf#", Format(NaoNull(frmCadAluno.datPrimaryRS(0).Recordset!cgc), "000 000 000/0000-00"), 1)
  39.     End If
  40.    
  41.     rtb.TextRTF = Replace(rtb.TextRTF, "#endereco#", NaoNull(frmCadAluno.datPrimaryRS(0).Recordset!endereco), 1)
  42.    
  43.     rtb.Visible = True
  44.     rtb.Locked = True
  45.     HScroll.Visible = False
  46.     VScroll.Visible = False
  47.     FlatScrollBar1.Visible = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement