Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Posts
    162

    Unanswered: Import file using batch file

    I'm not sure how the best way to do this, but I want to import an excel file using a batch file or something similar. Right now i'm using a plug-in with thunderbird to automatically save the file to a certain folder when it hits the inbox. This plug-in will also let me execute a command or program.

    Can someone point me in the right direction. I wondered if you could execute access with switches to run saved imports, or if a batch will would be better.

    Currently there are only two different files that come by two different emails, but this will eventually grow to about 6 files.

    Thanks for any help

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    One way among many: You could make an Access database that has a form which, when opened, does the import with VBA. You then set that form as your startup form. Then you only need to open the database and an import will happen.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Sep 2006
    Posts
    162
    So i could write an if statement to determine which file its working on. I'll work on that, but i'll take suggestions on how to do it without having to open access.

    Thanks StarTrekker

  4. #4
    Join Date
    Sep 2006
    Posts
    162
    Just to make a note that i can use /x switch to specify a macro to run.

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    No, you can't do that without opening Access. But it depends on what you mean by that.

    For example you could have a scheduled task set up that opens the database (in Access) automatically. It still needs Access to do it, but no-one has to do it. That database needs to do what it needs to do and then it needs to close itself.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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