Word Macro in VS 2005

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am Trying to run a Word Macro in VS2005 with Word 2007 (in Vista)

The following Code worked with VS2002 and Word 2003 (in XP)
Dim WordApp As New Word.ApplicationClass()
Dim FileName As Object = FileName
Dim isVisible As Object = True
Dim missing As Object = System.Reflection.Missing.Value
WordApp.Visible = True
Dim aDoc As Word.Document = WordApp.Documents.Open(FileName, missing,
missing, missing, missing, missing, missing, missing, missing, isVisible)

Now with VS2005 and Word 2007 (in Vista)

I get the Following Errors

Type 'Word.ApplicationClass' is not defined

Type 'Word.Document' is not defined

I would appreciate any help.
 
Back
Top