Export in Excel with dateformat

scgoodman

scgoodman
Local time
Today, 11:43
Joined
Jun 6, 2008
Messages
87
I would like to export a table to excel with a default today's date at the end of the filename. Can someone help me, please?
 
try this:

DoCmd.OutputTo acOutputTable, "myTable", "ExcelWorkbook(*.xlsx)", _
"c:\temp\myTable_" & Format(Date, "ddmmyy") & ".xlsx", False, "", 0, acExportQualityPrint
 

Users who are viewing this thread

Back
Top Bottom