Replace quotes in notepad
I don't think there is any way to automate Notepad but no need. Read the
file into memory, edit as required, and re-write the file.
Public Sub RemoveQuotes()
Dim sFile As String
Dim sText As String
Dim FF1 As Long
On Error GoTo errH
sFile = "c:\temp\testfile.txt"
FF = FreeFile
Open sFile For Input As #FF
Line Input #FF, sText
Close #FF
sText = Replace(sText, Chr(34), "")
FF = FreeFile
Open sFile For Output As #FF
Print #FF, sText
resClose:
Close #FF
Exit Sub
errH:
MsgBox Err.Description, , "An error occured"
Resume resClose
End Sub
Regards,
Peter T
"Michael" wrote in message
...
I have an excel .txt file that when opened in Notepad sometimes adds qoutes
the beginning of the data which causes a problem when imported into
another
application. What I would like to do is open the file in Notepad edit
replace " with nothing and save the file as a .txt.
Any suggestions would be greatly appreciated.
Thanks
Michael
|