Hello,
I'm creating a [CTI] application in C# that connects with an asterisk server and dials numbers.
I want this application to be built-in into Outlook 2010 as an Addin.
What's my question/problem: 1. How can I create a contextmenu when I rightclick a (individual)contact in the contactslist?
2. How do I get the phone information of the selected contact, and add this information as an "child"/submenu into the contextmenu (like this: [IMAGE])
I've spent 2 days on finding solutions, but I've made no progress at all.
What did I manage to do: create a context menu in Outlook, but not specific in the contactslist. I've managed to get phone information when I opened a (individual) contact, but not getting the information while it was only selected.
Please help me!
All help is appreciated.
includes:
[CTI] - http://en.wikipedia.org/wiki/Computer_telephony_integration
[IMAGE] - http://www.compendiumdev.co.uk/compendium-ta/casestudies/webandrss/contextMenu.gif
C# outlook, contextmenu & getting info from selected contact
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Suthish NairRank #93 · 22.6K pointsPosted Feb 24, 2011, 12:18 AM EST
Welcome....
Outlook integration with c# is one tough job i facing recently. Less support.
If you are lucky then will get a reply from msdn forums.
Also, post this same thread to msdn outlook forums.
Same time refer links:
http://www.packtpub.com/article/microsoft-office-outlook-programming-vsto-c-sharp-part1
http://www.add-in-express.com/forum/read.php?FID=5&TID=212
http://msdn.microsoft.com/en-us/library/ee909466.aspx
http://social.msdn.microsoft.com/Forums/en/outlookdev/thread/8e60581f-7a10-47c5-9dd5-7205c7628537
http://msdn.microsoft.com/en-us/library/ee692172.aspx
furb duustah2 pointsPosted Feb 24, 2011, 2:45 AM EST
Suthish NairRank #93 · 22.6K pointsPosted Feb 27, 2011, 7:15 AM EST
Adi2 pointsPosted Apr 19, 2011, 10:08 PM EDT
I've also integrated an external CTI Application into Outlook using the standard dial contact CommandBarButtons.
The solution is to capture the Click Event from a dial menu button. Use FindControl in the "Standard" CommandBar. The ID for the button is 32768, Recursive:=true. This is an ID for dynamic CommandBarButtons in Outlook. Other menu entries can have the same ID and will call the same Click Event.
Therefore you must test the given ctrl in the Click Event, if its caption has a dialable number.
I'm using this regular expression "^.{1,}:([\s\+]{0,})([\/\s\(\)\-0-9]{0,})$" to test the caption. For sure you should set CancelDefault to true, when you call your CTI Application, to avoid standard behaviour of Outlook.
Regards
Adi