PC Review


Reply
Thread Tools Rate Thread

Connecting to an addin in Outlook 2010 (or not)

 
 
CyberEeyor
Guest
Posts: n/a
 
      29th Jan 2010
Well, this is really a VB question, but this discussion group seems to be as
close as I can get. Please redirect me if there is a better place to ask this
question.

I'm trying to set up an Outlook addin using 2010 beta. A skeleton of the
code is shown below.

When I start Outlook, the addin shows up in the list of active addin. I get
the "Mail Checker addin created" and "Mail Checker addin deleted" messages at
the appropriate times. But I never seem to enter any of the IDTExtensibility2
subroutines. Equivalently, Outlook never seems to actually connect to my
addin.

Am I missing some message handler hook-up or something. I haven't seen
anything else in any of the MSDN examples. Are addins in Outlook 2010 beta
fully operational? I will be happy to try any and all suggestions.

Thanks
CyberEeyor

Imports Outlook = Microsoft.Office.Interop.Outlook
Imports System.Runtime.InteropServices
Imports System.Reflection
Imports Extensibility

Public Class MailCheckerAddin

Implements IDTExtensibility2

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

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

Private Sub IDTExtensibility2_OnAddInsUpdate(ByRef custom As System.Array) _
Implements
IDTExtensibility2.OnAddInsUpdate
MsgBox("Mail Checker notified that add-in have changed.")
End Sub

Private Sub IDTExtensibility2_OnBeginShutdown(ByRef custom As
System.Array) _
Implements
IDTExtensibility2.OnBeginShutdown

End Sub

Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, _
ByVal ConnectMode As
ext_ConnectMode, _
ByVal AddInInst As Object, _
ByRef custom As System.Array) _
Implements
IDTExtensibility2.OnConnection
MsgBox("Connecting to Mailcheker addin")

End Sub

Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As
ext_DisconnectMode, _
ByRef custom As
System.Array) Implements IDTExtensibility2.OnDisconnection

End Sub

Private Sub IDTExtensibility2_OnStartupComplete(ByRef custom As
System.Array) _
Implements
IDTExtensibility2.OnStartupComplete
Msgbox("Mailchecker Startup complete")
End Sub

End Class


 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      29th Jan 2010
It looks to me like your addin is a mixture of a shared addin and a VSTO
addin. A VSTO addin provides the Startup() and Shutdown() events, or at
least it does if the new disconnection registry setting is turned on. A
shared addin uses extensibility. You need to make up your mind as to which
you are trying to create, you can't mix and match.

You also need to post all the relevant information, such as if you are
running Outlook 2010 in 32-bit or 64-bit mode, which will make a huge
difference.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"CyberEeyor" <(E-Mail Removed)> wrote in message
news:3D358956-52D9-46D6-B80E-(E-Mail Removed)...
> Well, this is really a VB question, but this discussion group seems to be
> as
> close as I can get. Please redirect me if there is a better place to ask
> this
> question.
>
> I'm trying to set up an Outlook addin using 2010 beta. A skeleton of the
> code is shown below.
>
> When I start Outlook, the addin shows up in the list of active addin. I
> get
> the "Mail Checker addin created" and "Mail Checker addin deleted" messages
> at
> the appropriate times. But I never seem to enter any of the
> IDTExtensibility2
> subroutines. Equivalently, Outlook never seems to actually connect to my
> addin.
>
> Am I missing some message handler hook-up or something. I haven't seen
> anything else in any of the MSDN examples. Are addins in Outlook 2010 beta
> fully operational? I will be happy to try any and all suggestions.
>
> Thanks
> CyberEeyor
>
> Imports Outlook = Microsoft.Office.Interop.Outlook
> Imports System.Runtime.InteropServices
> Imports System.Reflection
> Imports Extensibility
>
> Public Class MailCheckerAddin
>
> Implements IDTExtensibility2
>
> Private Sub ThisAddIn_Startup(ByVal sender As Object, _
> ByVal e As System.EventArgs) Handles
> Me.Startup
> MsgBox("Mail Checker addin created")
> End Sub
>
> Private Sub ThisAddIn_Shutdown(ByVal sender As Object, _
> ByVal e As System.EventArgs) Handles
> Me.Shutdown
> MsgBox("Mail Checker addin deleted")
> End Sub
>
> Private Sub IDTExtensibility2_OnAddInsUpdate(ByRef custom As
> System.Array) _
> Implements
> IDTExtensibility2.OnAddInsUpdate
> MsgBox("Mail Checker notified that add-in have changed.")
> End Sub
>
> Private Sub IDTExtensibility2_OnBeginShutdown(ByRef custom As
> System.Array) _
> Implements
> IDTExtensibility2.OnBeginShutdown
>
> End Sub
>
> Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object,
> _
> ByVal ConnectMode As
> ext_ConnectMode, _
> ByVal AddInInst As Object, _
> ByRef custom As
> System.Array) _
> Implements
> IDTExtensibility2.OnConnection
> MsgBox("Connecting to Mailcheker addin")
>
> End Sub
>
> Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As
> ext_DisconnectMode, _
> ByRef custom As
> System.Array) Implements IDTExtensibility2.OnDisconnection
>
> End Sub
>
> Private Sub IDTExtensibility2_OnStartupComplete(ByRef custom As
> System.Array) _
> Implements
> IDTExtensibility2.OnStartupComplete
> Msgbox("Mailchecker Startup complete")
> End Sub
>
> End Class
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COM Outlook addin ribbon buttons not responding in Korean Outlook 2010 danwise Microsoft Outlook Program Addins 0 28th Oct 2010 06:53 PM
Outlook 2003 Addin fails to load for 32 bit Outlook 2010 Kevin Derhak Microsoft Outlook Program Addins 2 13th Sep 2010 09:37 PM
Outlook 2003 Addin fails to be recognised when install for 23 bitOutlook 2010 Kevin Derhak Microsoft Outlook 3 11th Jun 2010 04:10 PM
adobe acrobat pro addin with outlook 2010 nigel blanchard Microsoft Outlook Discussion 2 2nd Dec 2009 08:16 PM
.Net Outlook Addin Not Connecting Mike Bulava Microsoft Outlook Program Addins 5 18th Jul 2003 06:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:09 PM.