• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

Exporting a table into a text file without the field names in quotes

I use the following code to export a table into a text file including the field headers. I need to however export the field headers into the text file without quotes e.g. "Field1" ---> Field1

DoCmd.TransferText acExportDelim, , "Table1", "C:\test.txt", True

I then rename the file for specific purposes using:

Name "C:\test.txt" as "C:\test.dli"

Does anyone know how to export the field headers without the quotes, or another way of removing the quotes?
0
Hodges
Asked:
Hodges
1 Solution
 
shanesuebsahakarnCommented:
Define an import/export spec - manually export the table via the Export Wizard. Change the field delimiter to none. On the last page of the wizard, click Advanced and save the spec. Use the spec name as the second argument of the TransferText command.
0
 
HodgesAuthor Commented:
Thanks. Works wonders.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now