Results 1 to 7 of 7
  1. #1
    brandonze is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    49

    Batch import

    Hello all, I am new here and need help.



    I have a project that I am working on that is taking information off of a word doc (which I do by converting to txt and importing)

    My supervisor, who knows I don't know crap about VB says that doing each doc is too much work and wants to batch the doc in the morning when he gets in.

    Is there any way to write a program that will take all the doc files in a folder and convert them to txt files and then import them into a database?

    Please, I NEED HELP!!!!!!!!!!!!

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    yes there is. you write a loop in vba and use the code you're currently using, if any, in every loop iteration as you're moving through the folder.

    Does word have a recorded in it? I forget. If it does, record your actions as they are now, if you're not using code, and put that code into a vba loop.

    make sense?

  3. #3
    brandonze is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    49
    AJ, I am not using any code right now. I am trying to write code, but to start off, I don't even know where to write it. I would think in access, but it is grabbing stuff outside of the program so would this be in the right page. Also, What is a good book that would help me to learn the language? Thanks for the help

  4. #4
    brandonze is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    49
    this is everything that I want the program to do. I will try my best to put all the locations and the steps that I can but I am still learning and realy don't know what language that I should be using. So at best, this is a pseudocode. a really rough on at that.
    sub batchImport()
    openfolder "C:\Users\brandon.zemba\Documents\yellow_ribbon_re gistration_forms"
    open "firstdocument"
    click "officeButton"
    click "wordOptions"
    click "advanced"
    click "saved_word_data_as_delimited_text_file"
    click "ok"
    click "save"
    click "save"
    click "ok"
    close "doc"
    click "no"
    open "C:\Users\brandon.zemba\Documents\Yellow_Ribbon_Da ta_Bse.accdb"
    click "external_data"
    click "text_file"
    click "Browse"
    selectFirstFileIn "C:\Users\brandon.zemba\Documents\yellow_ribbon_re gistration_forms"
    click "open"
    click "Appened_a_copy_of_records_to_the_table:"
    select "Imported_Yellow_ribbon_data"
    click "OK"
    click "Finish"
    Click "close"
    repeatUntillEOF
    Ok, so it turned out a verry bad code, but I do not know the language to use. but this is basiclly a summary of what I want the program to do. Now the only question is how.

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Brandon,

    I understand that unreadable block you just posted. The steps make sense, but of course I don't have the time to write it all out for you. The recommendation for you that I have is to learn all you can from either the Word or Excel macro recorder. Record a macro and do what you want to do, all or in part, if you can, and then start reading and interpreting the code that those programs produce for you. That's much better than reading any book.

    The other advice I would have for you is, if you have no idea how to do it and your boss is adamant about getting it done, you could hire someone, as a last resort, to do this for probably 30 bucks or even less (and probably free if you found the right person). Personally, this would probably take me 10-20 minutes to write and test, and even less time if I could use my code libraries to copy from.

    But...those are my recommendations for you.

  6. #6
    brandonze is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    49
    how do you access this Macro recorder?

  7. #7
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by brandonze View Post
    how do you access this Macro recorder?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Batch Import and Update from DBF
    By Lady_Jane in forum Import/Export Data
    Replies: 7
    Last Post: 02-08-2011, 02:57 PM
  2. Run batch file
    By shay in forum Access
    Replies: 3
    Last Post: 12-15-2010, 09:47 AM
  3. Batch Update
    By Tyork in forum Programming
    Replies: 2
    Last Post: 11-15-2010, 05:33 PM
  4. Batch import .txt
    By hchui in forum Import/Export Data
    Replies: 1
    Last Post: 10-14-2010, 08:57 PM
  5. New Database - Batch processing
    By stevo2820 in forum Database Design
    Replies: 0
    Last Post: 04-30-2007, 02:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums