1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Macro help needed to export Word form results to a new file... Word/Excel

Discussion in 'Business Applications' started by postw, Apr 5, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. postw

    postw Thread Starter

    Joined:
    Apr 5, 2006
    Messages:
    5
    Hello all,

    I have been presented with a project that involves Forms that I am not able
    to resolve.

    Basically I have been asked to create a document template where other team
    members can fill out a form that asks a series of questions, then to have
    only the completed form results export to a new file.

    I am aware that Word can export the form results to a text file, but when I
    do this all of the questions that were on the original form are exported to
    the new file.

    What we are looking to achieve in the end:
    If the end user is faced with 20 questions, but only 12 of the questions
    pertain to the end users project, only the 12 completed form fields will
    export to a new file.

    I know that this should be possible with using a macro button to export the data, but that is where I need the help.

    I tried searching for this exact situation, but I did not find any matches, hence the new thread.

    Thank you in advance,

    Bill
     
  2. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,667
    Are you sending this form?
    If not you would be much better off using Access for this.
     
  3. postw

    postw Thread Starter

    Joined:
    Apr 5, 2006
    Messages:
    5
    No, the form would not be sent.

    The purpose would be that once all of the questions were answered, a new document would be created that would only contain the tasks needed for that specific project.

    I have been debating using Access, but i am not as comfortable with it as with other applications. Additionally, I am not certain if all the members on my team have Access installed.

    If anyone else is familiar with using a macro button to compile data from a form, your help would be greatly appreciated.

    If I am not able to find what I need, then I will just have to better train myself on Access.

    Thank you in advance...

    Bill
     
  4. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,667
    Bill, if you do need to go down the Access route I am quite happy to help you achieve the desired results.
    I may be able to work out the Word version for you but I am not familiar with Word just Excel and Access.
    Can you post a copy of the form with some dummy data in so that we can see the form for real?
    Also you could have a look at the sister forum to this one called VBAX which concentrates on VBA and has a seperate Word forum.
    It is at
    http://www.vbaexpress.com
     
  5. postw

    postw Thread Starter

    Joined:
    Apr 5, 2006
    Messages:
    5
    Thank you OBP,

    Well I put together a brief number of questions that could be on our final form.

    The form contains checkboxes, dropdowns, and free text fields. To be honest every field could be a free text field, where the end user would enter what they would want for that item, then once the form was submitted, whatever they typed in for that item, would display in a new file.

    Additionally, since this is basically a checklist to see what does and what does not need to be part of someones project, if excel is better suited, that is fine also. I could have all of the questions in excel, then have the answers to the items appear in a new excel or word file.

    The only issue is that the new file would only contain filled in/completed fields. If the end user left a field blank, then that item should not import to the new file.


    Your assistance is greatly appreciated.

    Thank you,

    Bill
     

    Attached Files:

  6. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,667
    Bill if you are not sending tihis, how do the responders get their copy?
     
  7. postw

    postw Thread Starter

    Joined:
    Apr 5, 2006
    Messages:
    5
    OBP,

    Basically this would be a form that would be used within the office. The locked template would be provided to all team members, they would then fill out the form, then hopefully after clicking on the macrobutton a new file would open containing only the items that they filled in and omitting the items that were left blank.

    Also, if you feel that sending the results through email is easier, then that is fine also.

    Our basic requirement is that the output only contains filled in fields and omits fields that are left blank.


    Thank you once again!

    Bill
     
  8. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,667
    Sorry Bill, I have had a quick look at Word macros and I do not even know where to start.
    If it was an Excel Spreadsheet or an Access Database I could probably achieve what you want.
    It is actually easier in an Excel sheet because you can just delete rows.
    In Access the fields are there but would not be visible if they had no data.
     
  9. postw

    postw Thread Starter

    Joined:
    Apr 5, 2006
    Messages:
    5
    OBP,

    OK, expanding on that...

    If I were to have each of my questions in an excel spreadsheet with Column A containing all of the questions, then have column B to have the answers entered, where would I go from there to have only the results populate to a new file or worksheet?

    Would I still use a macro?

    Thank you,

    Bill
     
  10. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,667
    Bill, yes have a command button to Save the Data. The VB behind the command button would check for any blank cells in column B and if blank delete the entire row prior to saving the worksheet. It could also save the worksheet with a user name and date or similar to distinguish from the original.
    Another alternatie is to use Text boxes in the worksheet instead of the rows and columns.
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/456216

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice