Connecting to an addin in Outlook 2010 (or not)

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


0
Utf
1/29/2010 6:37:01 PM
outlook.program_vba 490 articles. 0 followers. Follow

1 Replies
698 Views

Similar Articles

[PageSpeed] 14

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" <CyberEeyor@discussions.microsoft.com> wrote in message 
news:3D358956-52D9-46D6-B80E-881178E00CF8@microsoft.com...
> 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
>
> 

0
Ken
1/29/2010 8:51:49 PM
Reply:

Similar Artilces:

Microsoft Document Connection gives error "Only connections to SharePoint or SkyDrive servers are supported."
Trying to connect to my SharePoint server using Microsoft Document Connection with Mac Office 2011. Getting this frustrating error: "Only connections to SharePoint or SkyDrive servers are supported." I have the full version of Mac Office 2011 (not student/teacher edition) and am running MOSS 2007 Service Pack 2 (12.0.0.6421) on my server. I have no problem connecting to SharePoint using anything else. Does anyone have any ideas? I have tried the basic authentication option, too but this has has no effect. Thanks in advance! Toby On Jan 25, 8:22=A0pm, Toby <tobybore...@gmail...

Outlook 2003: Cannot connect to Exchange Server 2000
We have installed Outlook 2003, and have configured it to connect to Exchange Server 2000. But each time we try to open any Exchange mailboxes in Outlook, we get the following error: "The set of folders could not be opened." The details button shows the follows: "This error usually appears if the OST or PST file you are using is: -Unavailable -Protected with file permissions -On a share on a server and the network is down -Corrupt To correct this problem, store the OST or PST file on the local computer. You may also want to run the scanost.exe and scanpst.exe tools t...

How can Outlook be reinstalled on XP
Working with XP Pro. User was using only Outlook Express and deleted every file relating to Outlook. Now they want to install Outlook and there is nothing to be found. How can Outlook be reinstalled? Thanks Outlook or Outlook Express? For Outlook; insert the Office CD For Outlook Express; reinstall Internet Explorer 6 -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Navigation Pane Tips & Tricks -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Robert" <Robert@donotspam.com> wrote in message news:u4ckZYyfEHA.904@TK2MSFTN...

How do I uninstall Outlook 2007
I downloaded and installed Office 2007 SBA and it installed everything, but I didn't want Outlook as I use Windows Live Mail. I went into Control Panel and thinking there would be a "repair" option, but was just presented with the dialog "are you sure you want to uninstall Microsoft Office 2007?" and was afraid to click Yes because I only want to uninstall Outlook, not the whole thing. Can someone tell me how to uninstall just Outlook? Thanks. I posted this same message on 03/31/2010 but cannot find it and no one has posted any followup. Thanks in a...

Outlook express rules into outlook
Hi, I'm a long term user of Outlook Express, mainly for its ability to handle news as well as mail. Its message store as little flaky, to say the least, so I'm attempting to migrate back to Outlook for mail, I'm intending to try to use Windows Live Mail for news, since it seems to have a more robust message store. I've imported my Outlook Express accounts, messages and rules, after a fashion. The rules do not seem to have survived the import unscathed. I have many rules of the form: If 'from' contains 'address' OR If 'to or cc' contains 'addr...

Password Protect Outlook #2
I work in an offcie environment and sometimes have to leave my PC unattended for just a few minutes. Unfortunately some confidential emails have been read by my staff and I need a way of safeguarding them other than turning off the PC, is there any way I can password protect access into my Outlook 2000, so all I do is close Outlook. (Sorry still operating under W95) Many thanks You can set a password on a Personal Folders File. If the folder list isn't visible in Outlook, click View | Folder List. Right-click the root folder (usually "Personal Folders" or "Outlook T...

Outlook 2002 DRAGGING!
I am running windows xp and outlook xp (2002) on a dell inspiron laptop. I use the information store on the exchange server and SYNC before leaving for the deay. Over the last 24 hours I have run into extremely slow sluggish message reading, clicking between messages, etc. I have restarted our exchange server but that didnt seem to cure it. What issues should I look at in outlook to see if my information store is up to snuff? chaz ...

SBS Connectivity issues
Experiencing intermittent delays and dropped connections to Small Business Server. Config is: SBS2003 SP2 (all current patches) running on HP ML110 server; 4 PCs onsite - 3 used by onsite staff; 1 used by remote user to access server via RWW. Users run basic Office apps, Outlook, Quickbooks, internet access. Also have an Avaya VIOP phone system (4 phones) on the network. Everything has been in place for almost 4 years. Having more frequent connectivity issues. Onsite PCs show delays in Outlook connecting to Exchange ('Trying to connect ...). Remote user reports...

Outlook 2003 changes to Outlook bar
Hi I have the following script that adds a shortcut to the companies phone directory to the "Outlook bar". This works with Outlook 2000 and Outlook XP but with Outlook 2003 it fails. It gives me "Object Required: ol.ActiveExplorer". I have tried to debug the script (obiously slightly changed so it works within the Visual Studio) but still cannot see why this is the case because ActiveExplorer object exists in the Outlook Object browser. I was expecting the error with "Item("OutlookBar")" as the Outlook Bar has been changed/merged with the folder lis...

Microsoft Outlook Express #3
I am having a weird program with Outlook Express. I use Roadrunner. I have two computers networked. When I try to read my e-mail I have different e-mail on each computer. For some reason all of my e-mail does not appear on both of the computers. It is frustrating to have to open Outlook Express on both to see all of the e-mail. This problem started occurring after I had to have the hard drive reformated on one of my computers. I have Internet Explorer 6.00.2900.2180 (xpsp_sp2) on both computers. Can some one tell how to fix this problem. I have installed all the updates on both compu...

Unable to create protection Group For Hyper-V in DPM 2010
Hello Guy's, On DPM2010-RC, when I try to select the Hyper-V part of an added host, I get the following error: --------------- One or more prerequisites for protecting this data source is missing. Ensure that the following prerequisite software is installed on bucksrv02.bciglobal.nl and/or all nodes in the cluster: Windows Server 2008 with Knowledge Base article 948465 (http://support.microsoft.com/kb/948465) AND Knowledge Base article 971394 (http://support.microsoft.com/kb/971394) - OR - Windows Server 2008 R2 with Knowledge Base article 975921(http://support.microsoft.c...

ODBC Connection Not Connecting
I am using the below code to 1) automatically connect to a Microsoft ODBC for Oracle connection called "FIN_CUR" and 2) run an query on a linked table in FIN_CUR The issue i am having is that the ODBC connect part of the script appears to be working, but when it goes to try to run the query I still get the popup prompting for user name and password to make the connection to the ODBC. I have verify that the user name and password are correct, but don't know what I am missing. Here is my code Public Sub OraConnect() Dim strErr As String On Error GoTo...

Simultaneous socket connections. Is there a limit?
My client wants me to write an application that maintains 30 or 40 simultaneous socket connections to different hardware devices. For each device the throughput requirements are very small since only some small packets are sent occasionally at random intervals. Is there a simultaneous limit? 30 or 40 is far more then I have ever done. I don't want any surprises. Is there a limit? I assume XP Professional would handle this. Correct? Would XP Home be any different? My laptop has XP home. To certain incoming ports, its 10, although there are several cracks out their to remove this...

Outlook Win98SE Trying to Connect to Server time out. IBM 390E & Rogers.com
I have loaded Win98SE and Office 97 on an IBM 390E laptop using IBM Etherjet 10/100 network card connected to a D- Link 714P+ 4-port wire&wireless cable router. Network file transfers work fine, IE 6 works fine. Outlook often hangs when it loads and trys to connect to the (Rogers.com) server to download email messages. I contacted Rogers tech support and all settings are correct. If I take the router out of the loop and connect directly to the cable modem - Outlooks works like a charm & fast downloading of messages. I have 3 other PCs connected on the LAN and all work fine...

Outlook 2000, doesnt get email unless you *open* an email
Weird issue, Only happening on one machine. Outlook 2000 in a windows 2000 domain, exchange server etc. Mail works, send recv button doesnt seem to do anything, tools send / recv does nothing as well it will sit like that for hours, if I open an email or an attachment, the new mail comes right in. It then goes back to not getting any mail I played with settings, uninstalled, reinstalled, deleted mail profile, created new one, rebooted etc I'm at a loss, any ideas? Thanks in advance -Ron iasonn@gmail.com <iasonn@gmail.com> wrote: > Only happening on one machine. O...

VPN can't connect to workstations
I am running a 2k3 network and I am trying to connect my laptop w/ Vista to it using VPN. I can connect to the server and use server shares with no problem. My problem is that it cannot connect to the workstations . Would appreciate any input on that. "john" <johnbahran@hotmail.com> said this in news item news:b4419f87-386b-41de-876a-e3546096ecc2@c34g2000yqn.googlegroups.com... > I am running a 2k3 network and I am trying to connect my laptop w/ > Vista to it using VPN. I can connect to the server and use server > shares with no problem. My problem is ...

server connect
When I first start up Outlook 2003, it contacts the mail server and everything is hunky-doory. However, when attempting to next access the mail account by the send/receive access or in background, it indicates that it cannot locate the server and gives me error (0x80004210A). This error number is not consistent other than for the 0x800 portion. The location does not change, so how can it find it initially, and not later on? I'm confused. What type of mail server? POP3, IMAP, Exchange, HTTP, Other...? Does the same happen when you disable your firewall and/or virusscanner (integra...

IMAP: A connection to the server cannot be established
I have Outlook 2007 Installed on Two Separate PCs. One has Vista installed, and the other, Windows 7. McAfee Security Center is the Anti-Virus software unstalled on both PCs. I have setup 2 IMAP Accounts on each PC and can only get the ones on the Vista Box to work correctly. This is the error I keep getting on the Windows 7 Box: Task 'Synchronizing subscribed folders for [my-email-account].' reported error (0x800CCC0E) : 'Outlook cannot synchronize subscribed folders for [my-email-account]. Error: Cannot connect to the server. If you continue to receive this ...

Outlook client sync problem
We have been running CRM 1.2 for over a year now and I have a new problem suddenly crop up. A remote outlook client that has been successfully syncing over VPN for a year or more now gets an error when he tries to go off-line. The message is: Cannot open user default database, login failed. What is more curious is data that he recently put in shows up on the main CRM server but no longer shows up in his copy while off-line. When he goes back on-line, the data is there. Goes back off-line, error message appears and recent data dissapears again. Behind the message, it appears to be ...

Outlook freeze by starting a LDAP search
Hello, I have a Problem with the qcslapd sample or Outlook 2002\2003. In Outlook I configured the qcslapd server as a directory-server. And when I open my Outlook address book now, it build a connection to my qcslapd server and starting a search with filter (objectclass=*). And a fiew seconds later, I see in my debug log that all entries are sending successfully (about 10 Entries). But Outlook hang on and shows nothing. A Timeout or a error message doesent apeear! This phenomen is ONLY occurs in outlook! It works fine with all other LDAP-Clients eg. Mozilla-addressbook, LDAP-Browser or the mic...

Print email from Outlook
We are upgrading from Outlook Express 6 to Outlook2003. When we try to print an email w/attachment from Outlook the print does not show that there is an attachment in the heading. Outlook prints out From: Sent: To: Subject: <Body> Outlook Express prints out From: To: Sent: Attach: Subject: <Body> Any suggestion? Thank you Lonnie Update your copy of Outlook 2003 with Office 2003 Service Pack 1 -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "...

Intranet Connection
This is a multi-part message in MIME format. ------=_NextPart_000_0022_01C3CF10.F7EDF7A0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I am trying to connect 5 computers using Outlook XP intranet. What is = the best way to connect them....using MS mail, MS Exchange, etc. Thanks Douglas ------=_NextPart_000_0022_01C3CF10.F7EDF7A0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD>...

New to Using Outlook Help Please
Hi I'm transferrring for the first time from using a paper diary to using Outlook. Is there such a thing as a basic tutorial in how to use Outlook and its features. If so would truly appreciate a link. Happy New Year there are tutorials all over the internet. I have these two sites with lots of information and tips for using outlook but it's not really specific to 'converting from a paper diary'. It's usually easier to play around with it to learn how it works then if you have a specific problem, search for it or ask here. Outlook Tips: http://www.outlook-tips.n...

IE8 and Firefox won't connect to Yuku?
I've been having an issue tonight where my internet won't connect to the Yuku site first on IE8 then on Firefox, both sites got the same screen telling me it's an inactive site and I have connection issues. I ran the trouble shooter and it's telling me I don't have an issue? I'm on Windows 7 upgrade from XP, Windows Firewall is on, spyware is AVG and Spybot. I checked all the settings and nothing looked different as I was on the site like 2 days ago. Any ideas on what the problem is? Maybe you do have connection issues? 4thjet wrote: > I've been ...

Outlook Express address book #8
I can add addresses to contacts but it won't let me create or add contacts to the address book??? said something about contacting the administrator to crate an address book Address books are just virtual views of contacts - they contain only contacts with electronic addresses. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE-R...