Hello,
Here is the problem. The file is saved as a RTF file and shows up in the directory as such. When I load the file, it takes the formatting of the first character and applies it to the whole document. If the 1st character in the document is a bold, red letter, the whole document loads in bold red.
What be the deal?
Here is my code.
VB6code:
Here is the problem. The file is saved as a RTF file and shows up in the directory as such. When I load the file, it takes the formatting of the first character and applies it to the whole document. If the 1st character in the document is a bold, red letter, the whole document loads in bold red.
What be the deal?
Here is my code.
VB6code:
Code:
Private Sub Command18_Click() 'SAVE THIS FILE, but don't exit
Dim fileN As String
Dim strDir As String
Dim strNewFilename As String
fileN = Text4
If Text4.Text = "" Then
MsgBox "You Didn't type a FileName"
Exit Sub
End If
RTFText1.DataChanged = False
strNewFilename = "My_Saved_Files" & "\" & Text4.Text & ".rtf" 'TEXT4 IS THE FileName box that user will type in
strDir = "My_Saved_Files"
Open strDir & "\" & Text4.Text & ".rtf" For Output As #1
Print #1, RTFText1.Text
RTFText1.SaveFile App.Path & "\" & Text1.Text & ".rtf"
Close #1
Multi_Box_Bible.Caption = fileN
File1.Refresh
SaveFrame.Visible = False
End Sub
Private Sub File1_Click() 'Load file
RTFText1.LoadFile File1.Path & "\" & File1.FileName
File1.Visible = False
End Sub