Word Macro in VS 2005

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.
 

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