Hi,
I'm in need of some help.
I'm using this code to append data to a text file.
This will post to my "log.txt" file. But, the file looks like this
Any help or suggestion would be appreciated.
I'm in need of some help.
I'm using this code to append data to a text file.
Code:
Sub Test_Doc()
Dim filenr As Long
Dim Datestring, mypath, Myn As String
Datestring = Format(Date, "short date")
filenr = FreeFile
Myn = Trim(ThisDocument.Bookmarks("LastName").Range.Text)
mypath = ThisDocument.Path & "\Log.txt"
Open mypath For Append As #filenr
Print #filenr, Datestring & "," & Myn
Close #filenr
End Sub
This will post to my "log.txt" file. But, the file looks like this
7/28/2015,Har
here it has a blank square
But, when I open "Notepad" it has
7/28/2015,Har . a bold dot appears here.
Any help or suggestion would be appreciated.