I am using DoCmd.TransferText in an access form to import comma delimited files into an access database. The files come to me with extensions like .ct .cw etc. When I try to import them just as they are I get an error message that says that they are read only. What I have been doing is opening them up with notepad and then saving them as .txt files. Then I am able to import them. Is there anyway that I can get around having to do this. Either by writing something into my code, setting a property or something so that I don't have to tediously be opening them and saving them as .txt?
Here is the code that I am using to import them.
Private Sub Command4_Click()
Dim ctdocument As String
On Error GoTo Err_Command4_Click
DlgCommon.FileName = ""
DlgCommon.Filter = "special cs (*.txt)|*.txt"
DlgCommon.FilterIndex = 1
DlgCommon.InitDir = CurDir
If DlgCommon.FileName = "" Then
MsgBox " choose a file name"
ctdocument = DlgCommon.FileName
DoCmd.TransferText acImportDelim, "", "special", ctdocument, True, ""