Convert a text file to a tabbed delimited file

thepurplefrog

New member
Local time
Today, 10:22
Joined
May 20, 2010
Messages
1
How do you write a procedure or function to convert a text file to a tabbed delimited file w/o using the wizard or a macro? Can this be done? I also need to trim the extra spaces from the fields in the text file. Thanks

I know I posted this in the macros section but I could not find an appropriate section that fit my question.
 
Last edited by a moderator:
Are you stating you are starting with a text file and you want Access to import said file and then export it out as a tabbed delimited file? It can be done easily if the original file is still in a strict format, but why not using a macro for it? Create a import spec that knows the spacing of the original file, ignoring the blank spaces you want to remove first. Then choose this spec in the macro during the original import. Next, create an export spec in tab delimited format and use this one in the macro for exporting the text file back out. It can also be done in VBA, but the macro would accomplish what you want without the need for VBA...
 
Im saying import a text file, scrub it deleting the extra spaces, and convert it to a tabbed file using VBA.
 
is this a coursework project?

look at vba commands

open for input
line input
open for output
print, or write
 

Users who are viewing this thread

Back
Top Bottom