public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
applicationObject = (Outlook.Application)application;
addInInstance = addInInst;
applicationObject.FolderContextMenuDisplay += new
Microsoft.Office.Interop.Outlook.ApplicationEvents _11_FolderContextMenuDisplayEventHandler(
applicationObject_FolderContextMenuDisplay);
}
void applicationObject_FolderContextMenuDisplay(Microso ft.Office.Core.CommandBar commandBar, Microsoft.Office.Interop.Outlook.MAPIFolder folder)
{
CommandBarButton button = (CommandBarButton)commandBar.Controls.Add(
MsoControlType.msoControlButton, 1, Type.Missing,
commandBar.Controls.Count - 1, true );
// Exception occurs on next line:
button.Tag = folder.EntryID + ";" + folder.StoreID;
button.Caption = "My Command";
}
this is the other piece of code i've tried.
but @ Extensibility.ext_ConnectMode , the error is coming.
MISSING NAMESPACE OR TYPE.
these are the namespaces i've used.
using System;
using System.Windows.Forms;
using Microsoft.VisualStudio.Tools.Applications.Runtime;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
I'm totally new to these concepts. plz help.
where is the mistake?
Regards,
Muppidi.
|