Word.Document - user defined type not defined

J

jowatkins

I need to open a word document from excel. I've copied the followin
code from some examples I've found on this site.

Dim wrdApp As Object
Dim projectFile As Word.Document

Set projectFile = wrdApp.Documents.Open(Filename:= _
"C:\1-Joanne\Excel\test.doc")

But the program breaks each time with the error message "user type no
defined" for the word.document object.

I think that I need to add this to the library, but I've not idea ho
to do this.

Thanks in advance, J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top