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 AddInDesignerOb jects, Outlook, annd Office.
I have a class which has as a base class and implements the
IDTExtensibilit y2 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.MyAdd In' does not
implement interface member
'Extensibility. IDTExtensibilit y2.OnAddInsUpda te(ref System.Array)"
Any ideas on what's wrong here?
Thanks.
Pete 4 3321
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******@hotma il.com> wrote in message
news:8c******** *************** *******@news.me ganetnews.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 AddInDesignerOb jects, Outlook, annd Office.
I have a class which has as a base class and implements the IDTExtensibilit y2 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.MyAdd In' does not implement interface member 'Extensibility. IDTExtensibilit y2.OnAddInsUpda te(ref System.Array)"
Any ideas on what's wrong here?
Thanks.
Pete
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.I DTExtensibility 2.OnAddInsUpdat e(ref System.Array Custom)
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Pete Davis" <pd******@hotma il.com> wrote in message
news:8c******** *************** *******@news.me ganetnews.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 AddInDesignerOb jects, Outlook, annd Office.
I have a class which has as a base class and implements the IDTExtensibilit y2 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.MyAdd In' does not implement interface member 'Extensibility. IDTExtensibilit y2.OnAddInsUpda te(ref System.Array)"
Any ideas on what's wrong here?
Thanks.
Pete
The Add-In project, when generates code automatically, it adds
/// <summary>
/// Implements the OnAddInsUpdate method of the IDTExtensibilit y2 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='IDTExten sibility2' />
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 (IDTExtensibili ty2) ?
Kalpesh
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.m icrosoft.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. The Add-In project, when generates code automatically, it adds
/// <summary> /// Implements the OnAddInsUpdate method of the IDTExtensibilit y2
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='IDTExten sibility2' /> 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
(IDTExtensibili ty2) ? Kalpesh
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 has some assemblies,
all installed into the folder of my application
(C:\Programs\CompanyName\ProductName).
On two XP Pro SP2 stations I didn't...
|
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. Does anyone have a sample piece of code of how to send a simple plain
text email using this addin? I just can't seem to work it out.
Thanks,
|
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 2000?
'this works fine in ol 2000
Dim item As Object
Dim items As Outlook.items
Dim itemcount As Integer
Dim subfolder As MAPIFolder
Dim mi As...
|
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 installed, the process of
installation seems fine but the installed addin didn't start with outlook!
But when I install VS.net 2005 on that machine,...
|
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 (using the python
interpreter). But now, I want other poeple to use it to I want to
freeze it for windows using py2exe and py2exe is giving me a...
| |
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 are hit in my source code. The Addin isn't being loaded.
If I create a new Addin program from scratch, e.g. AddIn1, it loads up fine
from Outlook. I...
|
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 launches. I've wired up my event
handler to each Menu item and toolbar button. (I use the same Event handler
and I use the Tag property which is...
|
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 seems that other add ins aren't loaded afterwarths (nod32).
Does anybody know a way to find out why an outlook add could do this? and
find out after...
|
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 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...
|
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 fine in Outlook. However if
I use the setup generated in the setup project Release folder then even
though setup runs and finishes, the Outlook Add-in...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |