Link to home
Start Free TrialLog in
Avatar of TheUndecider
TheUndeciderFlag for United States of America

asked on

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

Hello,

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?

Thanks!

ASKER CERTIFIED SOLUTION
Avatar of Jarrod
Jarrod
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TheUndecider

ASKER

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.