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
But when I open the project in .net now 2 more are added:
And the old office references dissapear and new ones are added:
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:
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.