PDA

View Full Version : Export Word Legacy Form Data to Excel Worksheet w/ Submit Button



SciFi
01-09-2020, 08:53 AM
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

gmaxey
01-09-2020, 09:11 AM
You might be able to use this: https://gregmaxey.com/word_tip_pages/extract_data_from_forms.html

macropod
01-09-2020, 03:58 PM
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.