By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

Outlook AddIn in vs2008 questions

P: n/a
Hi

I have a simple Outlook 2003 AddIn created using Outlook 2003 AddIn template
in vs 2008. The full code is given below at the end. I got warnings on
Interop assemblies as I have Office 2007 installed while AddIn is 2003 but
as I need to target both 2003 and 2007 I am sticking to lowest common
denominator.

I installed the AddIn by running the vs 2008 generated setup.

First problem is In Outlook Trust Centre->Add-Ins, my add in is in Inactive
list. How can I automatically make the AddIn active during Setup?

Secondly, when I tick my Add-In under COM Add-Ins and restart Outlook, it
still remains Inactive and under COM Add-Ins it says; Load Behaviour: Not
loaded. A runtime error occurred during the loading of the COM Add-In.What
is the problems or how can I debug this issue?

Many Thanks

Regards

Outlook 2003 AddIn Code
==================

Public Class ThisAddIn

Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Startup
MsgBox("Startup")
End Sub

Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Shutdown
MsgBox("Shutdown")
End Sub

Private Sub Application_ItemSend(ByVal Item As Object, ByRef Cancel As
Boolean) Handles Application.ItemSend
MsgBox("Item Sent", , "My Outlook AddIn")
End Sub

End Class
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I think I may have cracked it.

I followed the steps in this video to cerate Code Access Security policy;
http://msdn2.microsoft.com/en-us/vbasic/cc338014.aspx

"John" <in**@nospam.infovis.co.ukwrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
Hi

I have a simple Outlook 2003 AddIn created using Outlook 2003 AddIn
template in vs 2008. The full code is given below at the end. I got
warnings on Interop assemblies as I have Office 2007 installed while AddIn
is 2003 but as I need to target both 2003 and 2007 I am sticking to lowest
common denominator.

I installed the AddIn by running the vs 2008 generated setup.

First problem is In Outlook Trust Centre->Add-Ins, my add in is in
Inactive list. How can I automatically make the AddIn active during Setup?

Secondly, when I tick my Add-In under COM Add-Ins and restart Outlook, it
still remains Inactive and under COM Add-Ins it says; Load Behaviour: Not
loaded. A runtime error occurred during the loading of the COM Add-In.What
is the problems or how can I debug this issue?

Many Thanks

Regards

Outlook 2003 AddIn Code
==================

Public Class ThisAddIn

Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Startup
MsgBox("Startup")
End Sub

Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Shutdown
MsgBox("Shutdown")
End Sub

Private Sub Application_ItemSend(ByVal Item As Object, ByRef Cancel As
Boolean) Handles Application.ItemSend
MsgBox("Item Sent", , "My Outlook AddIn")
End Sub

End Class


Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.