I want to populate a Word document with values from an Excel spreadsheet. Apparently the way to do this is to make reference to MS Word and use the following code snippet:
Dim wrdApp As Word.Application
However I get an error:
“User-Defined Type Not Defined”
So I try and set the reference via the tools menu but the references option is greyed out.
What do I need to do to enable this feature?
The references option in the editor is greyed out when the application is in break mode or code is otherwise running. I closed excel, reopened it and was able to add the Microsoft Word library reference.
Tags: excelexcel, vba