Output to macro

Q

quixote

Is there anyway to concatenate the Date to a filename
using Output To macro. For example I am outputting a table
to excel. I would like to save the file to a network
directory and give the date as part of the file name.

myFile08-19-03.xls...or myfile081903.xls

I would like to automate this rather than propmting the
user to Save As.

Thanks
 
S

Steve Schapel

Quixote,

In case your'e interested in a simplification...
DoCmd.OutputTo acTable, "myTable", "MicrosoftExcel(*.xls)",
"G:\Test\TestFile" & Format(Date,"yymmdd") & ".xls", False

By the way, this is not a macro, it is a VBA procedure.

- Steve Schapel, Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top