On May 27, 4:20 am, Bob Quintal <rquin...@sPAmpatico.cawrote:
Quote:
Alice <alicey...@gmail.comwrote innews:1180227694.202894.263870@i38g2000prf.google groups.com:
>
Quote:
Anyone knows how to convert .CAP files to .TXT files ?
>
Quote:
because Access doesn't read .CAP files, so in order to import
it, i'd have to manually open all the .CAP files and "save as"
filename.txt before importing them onto Access.
>
Quote:
is there a way to automate this process?
>
>
Public Sub CAP2TXT(stDirectory as string)
dim stCAPfile as string
dim stTXTfile as string
>
If right(stDirectory,1) <>"\" then
stDirectory = stDirectory & "\"
End If
>
stCAPfile = Dir(stDirectory + "*.CAP")
>
Do until stCAPfile = ""
stTXTfile = left(stCAPfile,len(stcapfile - 3) & "TXT"
filename stDirectory & stCAPfile, stDirectory & stTXTfile
stCAPfile = Dir()
LOOP
end sub
>
--
Bob Quintal
>
PA is y I've altered my email address.
>
--
Posted via a free Usenet account fromhttp://www.teranews.com
hmm...i just got the code to run, but the files are still in CAP
file.
The problem is, when i change the CAP file manually, i've to open up
the file and do SAVE AS to *.txt. If i were to just change the file
name w/o opening it, it'll remains as CAP file.
Is there any way to get around that?
Thanks,