The table name needs to be in quotes
DoCmd.TransferText acExportDelim, ,"EDI","c:\itl\Maersk EDI.txt"
You can set up an Import/Export Specification. To do that, go through the
process manually.
In the database window, highlight the table
From the menu - File, Export
Select Text Files in Save As Type
Give it a file name to Save to
Click on Export Text wizard
Click on Advanced
From here you can set the export up however you need it.
When you have the formatting like you want it, click Save As.
Enter a Name and save it.
Now you can add the Specification Name argument to the Transfer Text and it
will use it to do the formatting.
DoCmd.TransferText acExportDelim, "Spec Name Here","EDI","c:\itl\Maersk
EDI.txt"
You will get the