Here is an example of how to concatenate today's date into the filename. You
can use any format that you wish, so long as it doesn't contain any
characters that are forbidden for use in a filename.
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "AA", _
"\\Bhihnbwfa01\groups\HR\Verification\Org_View\ AA" & Format(Date(),
"dd-mmm-yyyy") & ".xls", , "AA"
--
Ken Snell
http://www.accessmvp.com/KDSnell/
"AJOLSON" <(E-Mail Removed)> wrote in message
news:8216DE7E-5AF6-4BFC-AF09-(E-Mail Removed)...
>I am exporting a query to excel file on our server, but I would like to add
> whatever the current date as an extention to the Name of the file.
> Example
> Current export file name AA.xls
> Would like it to be: aa_04/16/2010.xls
>
> How would I code that?
> Here is what I have
> DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "AA", _
> "\\Bhihnbwfa01\groups\HR\Verification\Org_View\ AA.xls", , "AA"
>