473,396 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Outlook AddIn

Using this as a guide:

http://support.microsoft.com/default...;EN-US;q302896

I am trying to implement an AddIn for outlook using C#. The sample is in
VB.NET, so I assume this has to be possible in C# as well.

I've added references to the AddInDesignerObjects, Outlook, annd Office.

I have a class which has as a base class and implements the
IDTExtensibility2 interface, and this is where I run into problems. There
are 5 methods to implement. Here's an example of one:

public override void OnAddInsUpdate(ref System.Array Custom)
{
}

Now, according to the Object Browser, the base implementation is:

public abstract new void OnAddInsUpdate(ref System.Array custom);

But, for my implementation, I get the message: "no suitable method found to
override". But, if I change the signature of the method (change parameter
types, method name, etc), I get the error: "'MyAddin.MyAddIn' does not
implement interface member
'Extensibility.IDTExtensibility2.OnAddInsUpdate(re f System.Array)"

Any ideas on what's wrong here?

Thanks.

Pete
Nov 15 '05 #1
4 3310
An addtional note. It seems odd, but when I don't include the override, I
get no message whatsoever. I should get a message that I have to use "new"
or "override". If I don't include any of the methods, then I get an error
that they're not implemented. What's going on?

Pete

"Pete Davis" <pd******@hotmail.com> wrote in message
news:8c******************************@news.meganet news.com...
Using this as a guide:

http://support.microsoft.com/default...;EN-US;q302896

I am trying to implement an AddIn for outlook using C#. The sample is in
VB.NET, so I assume this has to be possible in C# as well.

I've added references to the AddInDesignerObjects, Outlook, annd Office.

I have a class which has as a base class and implements the
IDTExtensibility2 interface, and this is where I run into problems. There
are 5 methods to implement. Here's an example of one:

public override void OnAddInsUpdate(ref System.Array Custom)
{
}

Now, according to the Object Browser, the base implementation is:

public abstract new void OnAddInsUpdate(ref System.Array custom);

But, for my implementation, I get the message: "no suitable method found to override". But, if I change the signature of the method (change parameter
types, method name, etc), I get the error: "'MyAddin.MyAddIn' does not
implement interface member
'Extensibility.IDTExtensibility2.OnAddInsUpdate(re f System.Array)"

Any ideas on what's wrong here?

Thanks.

Pete

Nov 15 '05 #2
Pete,

When I used the project wizard to create a new Office update, it gave me
this method:

public void OnAddInsUpdate(ref System.Array custom)

It used implicit interface implementation. You should be doing the same
thing, because you are not deriving from a base abstract class, but rather,
implementing an interface. Either that, or implement it specifically, like
this:

void Extensibility.IDTExtensibility2.OnAddInsUpdate(ref System.Array Custom)

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Pete Davis" <pd******@hotmail.com> wrote in message
news:8c******************************@news.meganet news.com...
Using this as a guide:

http://support.microsoft.com/default...;EN-US;q302896

I am trying to implement an AddIn for outlook using C#. The sample is in
VB.NET, so I assume this has to be possible in C# as well.

I've added references to the AddInDesignerObjects, Outlook, annd Office.

I have a class which has as a base class and implements the
IDTExtensibility2 interface, and this is where I run into problems. There
are 5 methods to implement. Here's an example of one:

public override void OnAddInsUpdate(ref System.Array Custom)
{
}

Now, according to the Object Browser, the base implementation is:

public abstract new void OnAddInsUpdate(ref System.Array custom);

But, for my implementation, I get the message: "no suitable method found to override". But, if I change the signature of the method (change parameter
types, method name, etc), I get the error: "'MyAddin.MyAddIn' does not
implement interface member
'Extensibility.IDTExtensibility2.OnAddInsUpdate(re f System.Array)"

Any ideas on what's wrong here?

Thanks.

Pete

Nov 15 '05 #3
The Add-In project, when generates code automatically, it adds

/// <summary>
/// Implements the OnAddInsUpdate method of the IDTExtensibility2 interface.
/// Receives notification that the collection of Add-ins has changed.
/// </summary>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnAddInsUpdate(ref System.Array custom)
{
}

So, just paste this method & provide your implementation.
Are you trying to hand-code each method that is exposed by the interface (IDTExtensibility2) ?

Kalpesh
Nov 15 '05 #4
My mistake was not using the add-in project. I didn't realize it was there.
I was coding everything by hand. By using the add-in project, everything is
working beautifully now. Thanks for the help.

Pete

"Kalpesh Shah" <ka*****@disc.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The Add-In project, when generates code automatically, it adds

/// <summary>
/// Implements the OnAddInsUpdate method of the IDTExtensibility2 interface. /// Receives notification that the collection of Add-ins has changed.
/// </summary>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnAddInsUpdate(ref System.Array custom)
{
}

So, just paste this method & provide your implementation.
Are you trying to hand-code each method that is exposed by the interface (IDTExtensibility2) ?
Kalpesh

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Samuel Bernard | last post by:
Hi, I created an addin for Outlook 2003. It creates a menu in Outlook in order to allow the user to access severals options of our Web site. I use MsiInstaller of MS to install this addin which...
1
by: Jon | last post by:
I want to send an email using the Outlook Redemption addin. 1. I ran their standard install.exe file. Does this register the dll on the system also or is that a seperate thing I have to do? 2....
4
by: Nathan Carroll | last post by:
Why am I able to use this in Outlook and not do the same from .Net. My problems centers around the Items in the xp version of below i used the interop references. Does something similar exist for...
0
by: Oliver Guo | last post by:
The outlook sample in the URL as below is fine. But I came with the problem about the installer that VS.net 2005 generated for me. When I ran this installer on another computer with no VS.net 2005...
0
by: guilligan.geo | last post by:
Hello, I'm trying to create an addin for Outlook 2002 using the one provided in the demo of win32com as a starting point. I've been able to do my addin and test it if I go the "standard" way...
7
by: Joseph Geretz | last post by:
I've been working on an Addin for Outlook in C#. It hasn't been long now, just a couple of days. Suddenly though, running my project in Debug launches Outlook as specified, but no breakpoints...
6
by: Joseph Geretz | last post by:
I'm porting a C# Outlook Addin originally engineered as a COM Addin over to use VSTO. I've gotten this to the point where my VSTO Addin installs its Menu items and Toolbar buttons when Outlook...
6
by: Pieter | last post by:
Hi, I developed an Outlook Add In (VB.NET 2005, for Outlook 2003) that sometimes suddenly stops loading. I've put everywhere in the code Exception Handlers, but no Exception is catched. it...
1
by: John | last post by:
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...
5
by: John | last post by:
Hi I have an Outlook add-in solution which includes a setup project. If I install the Outlook add-in by right clicking on the setup project and sleeting Install then the add-in gets installed...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.