How can I use the Rename macro action to not overwrite the file

G

Guest

I need to create a macro that copies a table and exports it but also saves
the table as a new table name each time the macro runs. Bascially, I need to
be able to maintain the historical tables.
 
K

Ken Snell [MVP]

Use the TransferText (if you want a text file as the output). In the File
Name argument, use an expression such as this to incorporate the date and
time in the name to make it unique:

="C:\MyFolder\MyFileName" & Format(Now(), "yyyymmdd_hhnnss") & ".txt"
 

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