Hi all I would like to create a button in the context menu (right click) for the selected contact. This button has the same functions as the call button. Is there a way to create this add-in for Outlook 2007 and 2010 in Visual C # and NOT in VB.NET. I repeat NOT in VB.Net.
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
privatevoid ThisAddIn_Startup(object sender, System.EventArgs e)
// Custom context menu item event managedthis.Application.ItemContextMenuDisplay += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemContextMenuDisplayEventHandler(PacktMenuItem_ItemContextMenuDisplay);
// Context menu item adding procedurepublicvoid PacktMenuItem_ItemContextMenuDisplay(Microsoft.Office.Core.CommandBar PacktCommandBar, Microsoft.Office.Interop.Outlook.Selection Selection)
// Commadbarpopup control to context menu item
Office.CommandBarPopup callBarPopUp = (Office.CommandBarPopup)PacktCommandBar.Controls.Add(Office.MsoControlType.msoControlPopup, Type.Missing, "Custom Menu Item 1", PacktCommandBar.Controls.Count + 1, Type.Missing);
// Set the tag value for the menu
callBarPopUp.Tag = "PacktCustomMenuItem1";
// Caption for the context menu item
callBarPopUp.Caption = "TAPI Call 1";
// Set it to visible
callBarPopUp.Visible = true;
Office.CommandBarButton callButton2 = (Office.CommandBarButton)callBarPopUp.Controls.Add(1, missing, missing, missing, true);
callButton2.Caption = "Call xxxx!";
callButton2.Click += new Office._CommandBarButtonEvents_ClickEventHandler(Callxx);
publicvoid Callxx(CommandBarButton Ctrl, refbool CancelDefault)
// i want send selected number of a specific contact card how can i do it?
privatevoid ThisAddIn_Shutdown(object sender, System.EventArgs e)
#region VSTO generated code
///<summary>/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
Ho can i put these numbers instead Call xxxx! To call functionand pass number i've selected?
How can i load all numbers of selected contact to popup? And when i click it call a function passing the selected number?? Thanks! Thanks for any help!! :D And sorry for yesterday i was almost nervous....
Not the contacts, but the replacement-phone numbers. If they're coming from an outlook-style address book, you'd have to look if the addin-framework supplies it's contents. Something like done in this article[^].
I'll print and study it. Thanks! Ehm i'm working hard on my tapi projet. I've created a chat/telephony client server using atapi julmar. And when done i'll sell it . If you interested i will give you my code
And when done i'll sell it . If you interested i will give you my code
If you can afford the time, consider explaining the code and turning it into an article. That way more people could benefit from it. You can't use the article to "advertise" the solution, but you could explain the basics with a small sample project.
//In the German version of Outlook the default command bar//is named "Standard". In other language versions of Outlook//this name could differ, then you need to modify the next line
Office.CommandBar cmdBar = cmdBars["Standard"];
What's standard in italian and english versions?