how to get value from textbox in vb6 to *.rtf files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • octa
    New Member
    • Mar 2015
    • 1

    how to get value from textbox in vb6 to *.rtf files

    Code:
    Dim sFile As String, dFile As String
            On Error GoTo Salah
            If Dir(sFile) <> "" Then
            Open (App.Path & "\proposal.rtf") For Output As #1
            Open (App.Path & "\proposal_output.rtf") For Output As #2
                Do While Not EOF(1)
                 Line Input #1, tmDat$
                    sReplace = Replace(sReplace, "<<nama>>", nama.Text)
                    sReplace = Replace(sReplace$, "<<nim>>", nim.Text)
                 Print #2, sReplace$
                    DoEvents()
                Loop
                Close()
            End If
    
            ShellExecute(hWnd, "open", dFile, "", App.Path, 1)
            Exit Sub
    Salah:
            MsgBox(Err.Description, vbInformation, "Terjadi Kesalahan")

    I HAVE PROBLEM IN APP.PATH
    Last edited by Rabbit; Mar 25 '15, 06:06 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Could you please provide more specific information? What sort of problem?

    Comment

    Working...