Results 1 to 4 of 4

Thread: Save file with date stamp

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2005
    Posts
    37

    Save file with date stamp

    Hi guys,

    I'm using the OutputTo function to save a report out of Access and need to save the name with a number and the current date stamp plus in this format "mm-dd-yy.rtf". Here's my OutputTo line that I'm using:

    VB Code:
    1. DoCmd.OutputTo acOutputReport, "My_View", acFormatRTF, "c:\Test\0205.rtf", True

    So I need my filename to be 0205-MM-DD-YY.rtf. My brain is fried for today and I can't figure this out. Thanks!

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Save file with date stamp

    Moved to Office Development forum

  3. #3
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Save file with date stamp

    Something like:
    VB Code:
    1. DoCmd.OutputTo acOutputReport, "My_View", acFormatRTF, "c:\Test\0205" & Format(Date, "mm-dd-yy") & ".rtf", True

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 2005
    Posts
    37

    Re: Save file with date stamp (Resolved)

    Quote Originally Posted by Bruce Fox
    Something like:
    VB Code:
    1. DoCmd.OutputTo acOutputReport, "My_View", acFormatRTF, "c:\Test\0205" & Format(Date, "mm-dd-yy") & ".rtf", True
    Thanks!

Posting Permissions

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



Click Here to Expand Forum to Full Width