Results 1 to 2 of 2

Thread: export macro

  1. #1
    Join Date
    Nov 2004

    Unanswered: export macro

    Hi all

    Need to export a table to the c:\ drive.
    However i would like it to be automated in a macro...
    Is there a way to use a date function to give each export a unique identifier?

    i.e [name of table] + Date()? or something?

  2. #2
    Join Date
    Jun 2004
    I never use macros, but to do it in code it would be;

    DoCmd.OutputTo acOutputTable, "tablename", acFormatXLS, "c:\" & Date & ".xls", False
    Obviously changing the path and format to the ones you want.

    Additionally you would need to change in the regional control panel the date seperator to - instead of /. This is because windows doesn't allow file names with /'s in them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts