[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

.NET code and reference Issues when upgrading from Office 2000 to 2007


I work with Visual Studio .Net 2003.  We create proprietary applications for our company that use Excel to export data to spreadsheets and Word to check for spelling.  I used to have Office 2000 Professional in my developing machine, as my developer coworkers currently do.

However, I recently upgraded to Office 2007 Professional and ever since I did, I am having problems with all my .net applications.  I get Office related errors like this when trying to use spelling "Microsfot Word must be installed  for Spell/Grammar to run.

I know this is because the upgrade and the library references have changed.  We are in the process of upgrading everybody from Office 2000 to 2007 around the office but in the mean time we're supposed to support both versions.  

I read about installing PIAs in my developing machine but I am somewhat confused about that.  

Back to my current project, I used to have these dlls in my bin folder

- Interop.Office.dll
- Interop.Word.dll
- Interop.VBIDE.dll

But when I open the project in .net now 2 more are added:

- Interop.Microsoft.Office.Core.dll
- Interop.Microsoft.Office.Interop.Word.dll

And the old office references dissapear and new ones are added:

- Microsoft.Office.core
- Office

This causes my program not to compile and throws these errors:

Type 'Word.Application' is not defined.
The referenced component 'VBIDE' has an updated custom wrapper available.

This is how I used to call Word for spell checking in one of my forms:

Imports System.Runtime.InteropServices

Public Class myclass

Private sub mysub

' This invokes  the Word spell checker.
Dim objWord As Object

' Create temporary document object.
Dim objTempDoc As Object
objWord = New Word.Application
objTempDoc = objWord.Documents.Add
objWord.Visible = False

I would then paste the text I need to check to the temp object, activate the temp object and check spell.

Another big issue is that my coworkers who are also developers have Office 2000 installed in their machines and we update and share our code back and forth.  Therefore, I don't want to modify the code so it could work in my machine but not in theirs.  I need to make it work in our developing computers and the compiled programs to work in all the office computers where we have about 50% Office 2007 installed and the other Office 2000.

Any ideas?


1 Solution
you are going to have to upgrade all your projects to run of the new com interface, however this is going to cause a problem in that when you release the apps - the target computers must also have been upgraded.
Unfortunatly there is no backward compatibility here .... I hade the same problem once.
TheUndeciderAuthor Commented:
Thanks.  I've done lots of researching and if the rest had Office XP or 2003 it would work using PIAs, but since we're dealing with Office 2000 it won't.  I will downgrade and keep it that way until everyone else is using 2007.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now