Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Delete files (AXP)

    Hello All,
    Is there a way to delete files I have created using macros? For instance, I have a macro that does an outputto command and in turn creates an RTF file. I want to delete this file with code when the procedure is done running.

    Thanks,
    Mark

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Delete files (AXP)

    I don't use XP, but in previous version of Access the Kill statement will delete a file.
    This is from Help in Access 2000

    <pre>Kill pathname

    The required pathname argument is a string expression that specifies one or more file names to be deleted.
    The pathname may include the directory or folder, and the drive.</pre>

    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Delete files (AXP)

    If you use Kill, you need to trap the error that occurs if the file doesn't exist.
    Charlotte

Posting Permissions

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