+ Reply to Thread
Results 1 to 15 of 15

Excel macro to extract Word form data into Excel

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Excel macro to extract Word form data into Excel

    Hello all,

    I have a word doc that has a form in it. The form may have any number of fields (boxes) to type text answers into, or be a drop down list to select an answer from. I need an excel macro that extracts all data from the form, but with every five fields starting a new row in excel. So all data from the form will appear within 5 columns in an excel spreadsheet.

    field 1 field 2 field 3 field 4 field 5
    field 6 field 7 field 8 field 9 field 10
    etc

    Is that possible? I have had no luck to do it myself.

    Sample form attached, thank you.
    ____________________________

    sample.doc
    Last edited by Phillipe; 08-27-2012 at 07:13 AM.

  2. #2
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Excel macro to extract Word form data into Excel

    Where do you get stuck?

  3. #3
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    I was hopeful for a solution in one forum but without luck. So I am now also asking the question in these forums. When I find a solution, I will close this post.

    http://forums.techguy.org/business-a...ml#post8451764

    http://stackoverflow.com/questions/1...ata-into-excel

    http://www.vbaexpress.com/forum/show...233#post275233

    Thanks

    ---------- Post added at 10:08 PM ---------- Previous post was at 10:01 PM ----------

    Hi bongaan,
    I played blindly it seems with code from different posts. I try to record a macro myself and immediately get stuck with a Run-time error '1004' message. Watched a couple of tutorials that were very interesting but I need a solution rather more urgently than the time it would take this mind to get across it all.

  4. #4
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Excel macro to extract Word form data into Excel

    I guess then that your programming skills don't go very far and you rather wish to have a solution than help?
    Can you maybe post a genuine example of your data and not one filled in with "false" data.

  5. #5
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    Hi bongaan,
    I played blindly it seems with code from different posts. I try to record a macro myself and immediately get stuck with a Run-time error '1004' message. Watched a couple of tutorials that were very interesting but I need a solution rather more urgently than the time it would take this mind to get across it all. Can you do it for me?

  6. #6
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Excel macro to extract Word form data into Excel

    Can you maybe post a genuine example of your data and not one filled in with "false" data.

  7. #7
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    Hi bongaan,
    If you are referring to the sample.doc I provided, that is the only form I have created. Do you want me to make it 'look' more genuine? How? Why is it 'false' data?

  8. #8
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Excel macro to extract Word form data into Excel

    Do I understand it correctly that you have a lot of data already saved in a form or forms like your sample.doc? I wish to see one of those, not the sample which you uploaded, the real McCoy.

  9. #9
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    Maybe this will be helpful to everyone ..

    Create a folder on your desktop called <macro> and a folder therein called <process>.
    Place <sample.doc> into that <process> folder.
    Place <sample.xls> (see my next reply) into the <macro> folder if you like.
    Look at the macro code in <sample.xls> and change <User> to <your desktop user name> (2 places).

    This <sample.xls> has a macro that saves the word form data in <sample.doc> to one row in the spreadsheet. (The code also allows you to save more docs to rows under it which for me is not necessary, but ok anyway). You can see in the spreadsheet how I would prefer it if possible, five columns.

    Thanks, I hope that makes it clearer to everyone.
    _________________________
    sample.doc

  10. #10
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    The spreadsheet ..
    ______________

    sample.xls

  11. #11
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    Closing the post in 2-3 days, a little time in case someone is pondering it.
    Thank you to all those who took the time to look at it and try it for me. No doubt there were a few who did and I appreciate it.
    Stay safe.

  12. #12
    Registered User
    Join Date
    08-27-2012
    Location
    Saldanha, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Excel macro to extract Word form data into Excel

    Mate, you've been avoiding all my questions, but let me ask one more again. Why do you want to do this if you don't have any data already stored on word docs? Why don't you then rather create a form in Excel, it's much easier to pull data from one Excel doc to another.

  13. #13
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    It has to be a word doc with a protected form therein, that I send to people to fill in and return to me. I want to avoid sending them an excel spreadsheet.

  14. #14
    Registered User
    Join Date
    08-27-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Excel macro to extract Word form data into Excel

    Solution obtained, thanks again ye all.
    http://www.vbaexpress.com/forum/show...650#post275650

  15. #15
    Registered User
    Join Date
    09-01-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel macro to extract Word form data into Excel

    Great thanks for the help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1