Of course you don't - sorry, the word macro just didn't register with me.
Okay, you'll have to convert your macro to VBA.
Highlight your macro in the list and then choose Tools > Macro > Convert Macros to Visual Basic.
The VBA window will open and you can find your converted macro by double-clicking in the project window on Modules > Converted Macro- yourMacroName.
Then replace the filename in the DoCmd.TransferText command with my suggestion from earlier.
Your line of code should then look something like this (make sure it is typed on one line):
Code:
DoCmd.TransferText acExportDelim, "", "yourTableName", [b]"c:\yourPath\yourFilename_" & Date() & "_" & Time() & ".txt"[/b], False, ""
To actually use the code, create a new macro using the
RunCode action, and enter the name of your new VBA function as the parameter. So for instance, if your converted macro is called
Function ExportFile() in the VBA window, in your new macro you should enter
ExportFile() in the RunCode parameter. Then run your new macro instead of your old one in whatever way you are doing, e.g. from a command button.
Hope this helps this time
Mac