Select the table or query you want to save and go to file and save as. You will want to export to file and when the save as box comes up you will need to change the file type to text files which includes .csv. This will activate a wizard and you will be able to specify how you want the file saved. There will be an advanced button and you will want to click on that. There you will have another save as button which will allow you to save a specifications file. Once you have the specifications file saved, you can use the TransferText Action (in a macro) or Method (in VBA) and use the specifiction file name where indicated. Now whenever you run the macro, or code, the file will be exported to your specifications.
The transfertext method does automatically create a comma delimited file, but it also puts "" around and text field in the output. Most people don't want the quotes so that is why I recommended the creating the specification file. By all means, if transfertext creates exactly what is wanted, use it without the specification file.
Yes, I think you're correct about enclosing text data in quote marks; other fields seem exempt. I have found though that I can still import and use the data in either Excel or Word and the quotes aren't a bother. However, it's nice to know there's an easy method around this if the need arises.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.