Word.Document - user defined type not defined

  • Thread starter Thread starter jowatkins
  • Start date Start date
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
 
Back
Top