Updating Office versions for existing addins

Add-in Express™ Support Service
That's what is more important than anything else

Updating Office versions for existing addins
Sujay Ghosh

Posts: 27
Joined: 2010-01-20
Hello Andrei ,

This is actually a duplicate, but I unable to quote/ reply to the Changing Office version of Addins, but it is displaying error "The type or namespace name 'Word' could not be found (are you missing a using directive or an assembly reference?)"

This is what I did - Added the interops from Addin Express Redistributables ( of Office 2007 ) and removed the Interop.Word, Interop.Outlook,

The errors go away when I fully qualify the Word, Outlook as below

public Microsoft.Office.Interop.Word._Application WordApp
return (HostApplication as Microsoft.Office.Interop.Word._Application);

I have also added the following lines at the top of the AddinModule.cs file

using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Word;

I have made the above changes, but sadly it asks me to make the change everywhere WordApp is used.

Please suggest.

Thank you
Posted 10 Mar, 2023 12:05:50 Top
Andrei Smolin

Add-in Express team

Posts: 18614
Joined: 2006-05-11
Hello Sujay,

I suppose your code expects these using statements:

using Word = Microsoft.Office.Interop.Word;
using Office = Microsoft.Office.Core;

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Mar, 2023 04:52:06 Top