I am very new to Vb and I got faced with an issue when saving text from a text box into a word doc. The document saves fine wherever I want it to save but when I open it pops up with
This is the code for the save
Private Sub BtnSave_Click(sender As Object, e As EventArgs) Handles BtnSave.Click
Dim SaveDialog As New SaveFileDialog
SaveDialog.Filter = "Word Document (*.docx)|*.docx|Word 97-2003 Document (*.doc)|*.doc|Plain Text (*.txt)|*.txt"
SaveDialog.ShowDialog()
If SaveDialog.FileName <> "" Then
Dim writer As New StreamWriter(SaveDialog.FileName)
writer.WriteLine(TxtPreviewcertificate.Text)
writer.Close()
End If
End Sub
End Class If anyone could help me with this please let me know, thanks.