Outlok Add-in Woes!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an add-in that I have tweaked from an example download. They used the
10.0 Interop assemblies. I changed it to use the 11.0 assemblies cause it is
going to be strickly an Outlook 2003 Add-in. I have installed the plug in on
two different Windows 2003 computers and it works great.

I have installed it on Two different Windows XP computers and it breaks. On
one it does nothing and on the other I get the following error:

---------------------------
OutlookCOMAddinVBNET
---------------------------
Specified cast is not valid.

at OutlookCOMAddinVBNET.OutAddIn.m_olInspectors_NewInspector(Inspector
Inspector) in C:\vsproj\ProjectOutlookAddin\OutAddIn.vb:line 335
---------------------------
OK
---------------------------

So I decided to try to debug it. So I took the entire project including the
installer and loaded it on a box with Windows XP, Outlook 2003 and Visual
Studio.net 2003. It builds fine and installs fine but when I go to debug it
it doesn't activate the add-in. It shows up in the add-in box in Outlook
2003 and I can check the check box but it doesn't stay checked after I hit
ok. Since it never loads I can't debug it. I have spent about 2 days on
this and I can't figure out the problem.

Thanks in Advance!
 
Well, I figured out what was causing the error. Apprently in Outlook XP or
less you have to declare a mailitem as a mailitemclass but in 2003 you have
to declare it as a mailitem. That said I still have some strange stuff
happening. One, I still can't debug the add-in. It just won't load it at
start up no matter what I do. It works fine if I install it from the msi
setup that is created in vs. The second issue is if I make a change to my
propject and build JUST the main project the installed version stops working
in outlook. I have to reinstall the newly built project for it to work. Why
is that? I am building the dlls to the bin folder and the dlls that the
outlook add-in are using should be in the programs folder that the add-in is
installed to when I run the msi setup file. How does outlook know that there
is a new version on my computer and why would it care if should be running
from the installed dlls? I am really confused.

Thanks!
 
I don't use .Net to develop Outlook add-ins, so I don't really know. I
suspect however that .Net re-registers your newly compiled add-in, forcing
Outlook to load the last version.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top