Consulting

Results 1 to 3 of 3

Thread: Export Word Legacy Form Data to Excel Worksheet w/ Submit Button

  1. #1
    VBAX Newbie
    Joined
    Jan 2020
    Posts
    1
    Location

    Lightbulb Export Word Legacy Form Data to Excel Worksheet w/ Submit Button

    Greetings,

    1. First time poster here. Hereís my question:
    STATUS. I built a word template for my company to automates the construction of our agreements. It has a legacy form on the first page that pulls clauses/verbiage into the rest of the document using conditional statements that reference the bookmarks in the form.

    PROBLEM. I would like to create a submit button at the end of the form that, when pressed by the user, automatically exports the userís responses to the form to one excel worksheet that houses all user responses to the form.

    PRIOR ACTIONS. I cannot use an excel macro to search the folder where the word documents are saved because the users save each instance of the template agreement in different project folders. Additionally, it is impracticable for the form data to be sent to me via email.
    2. Any help is greatly appreciated!

    Sincerely, Harry

  2. #2
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,098
    Location
    Greg

    Visit my website: http://gregmaxey.com

  3. #3
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    3,962
    Location
    Doing this from Word is fraught with difficulty. For one thing, it is likely to fall over if anyone else has the workbook open. For another, what are you going to do if a user presses the submit button more than once - even on different dates (e.g. to correct an error - including an incomplete form - or because originally-correct data needs updating)?

    Far better, IMHO, would be a process that exports the Word data as a text file to a specified directory (thus ensuring updates overwrite the original), and have a separate Excel macro that imports all data from that folder, overwriting whatever data are already present.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Tags for this Thread

Posting Permissions

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