Export Text File Name Problem

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

I have a need to export a table to a text file and give
that file a long file name containing multiple periods in
the name. For example:

DoCmd.TransferText acExportFixed, "EXP_7", "CURRENT
DATA", "C:\DATA\OUTPUT\VBA.EXP.TST.CUSTOM.EXT"

This should export the table "CURRENT DATA" to the file
name: "VBA.EXP.TST.CUSTOM.EXT", but when Access97 writes
the file, the periods are changed to pound signs:
"VBA#EXP#TST#CUSTOM.EXT".

This is not a big deal but will, otherwise, take extra
steps to delete and rename files.

Thanks in advance.
Sam
 
Looks like you will have to take that extra step.
You can use VBA code to locate the bad name and then try re-naming it.
This can be included as an extra step to your procedure.
 
Back
Top