Recently I stumbled upon an issue of creating a quick survey for clients/users. Usually you would want surveys set up in a dedicated web application like Google Forms or Survey Monkey. However, in this case I was limited to MS Word – the doc / docx survey was to be sent via email to clients/users and consolidated. Seemed like a lot of manual work. But why bother when you can use VBA? I created the survey using MS Word ContentControls (text fields, checkboxes etc.) and ActiveX objects (for option / radiobuttons only). Collecting the results was quite easy using VBA. The code is reusable for virtually any survey created this way. Below I explain my approach of making a survey in Word and how to easily consolidate the results using VBA macros (next page of this post).
Designing the survey
Most people don’t put enough effort into designing their surveys – sloppy designs, messed up document structures or simply frequent typo’s and misspelled questions. All these will heavily deteriorate the quality of your survey. Skip this section if you want just the solution/code. If you are still developing your survey, however, I encourage you to at least review the steps for designing a good survey.
When designing your survey always start with the following:
- Draft your targets/objectives – what do you want to achieve with your survey? What information do you want to collect? Make a list of your objectives
- Develop you questions and map them to your list of objectives for completeness. Remove questions that do not map to any objectives. Check if there are any duplicates – questions that provide results for the same objectives in a similar way. Are there any objectives not covered by a single question?
- Review your list of questions – limit the survey to a reasonable amount of questions. Make sure your survey is balanced – not too many questions for a single objective
- Decide each type of question – should they be open questions (text) and which ones should have a limited set of answers (multiple or single choice)
- Draft answers to closed questions
- Review all answers for completeness. Standardize questions with scales. Make sure to organize the answers and sort them appropriately
- Make sure the survey looks clean and structured
- Spelling and grammar – make sure there are no no typos/misspelled words etc.
Insert Word form controls
When you have completed drafting your survey and structuring it you can move on to adding the actual form controls to make you survey interactive and enable automatic results extraction.
Here is a list of different mapping types of question to the various controls you may use:
|Type of question||Form control to use||Instructions|
|Open questions – Dates||
|Singlechoice closed questions||
|Multichoice close question||
Below a short example of how to correctly configure a Option Button (Radiobutton). Be sure to name the control appropriately and assign the same GroupName to all answers of a single set.
Be sure to test the survey and double-check for any typos and other editing errors twice before dispatching it to your respondents.
Automatically consolidating the results
Now that you have your survey ready it’s time for consolidating the results. If you used the form controls mentioned above you can quickly consolidate your results using the following VBA macro.
How to consolidate results
- Make sure that all survey results are in a single folder and the consolidation Excel file is in a parent folder
- Execute the ExtractResults VBA macro or click the Consolidate Survey Results in the Excel xlsm file above
- Select the folder with the survey results
- All results will be uploaded to the Excel file
Want an example of the above survey? Simply download the example below:
Conclusions for making a survey in Word
That’s it! Hopefully making a survey in Word will be much easier for you! I would especially like to stress on the design phase of your survey. As usually you will only get 1 hit for the survey, it is crucial to focus on you targets/objectives when drafting your questions.
Learn how to work with VBA in Word:
Word: Word VBA Tutorial