Customized Recipient (TO) control available or reuse existing built-in

Add-in Express™ Support Service
That's what is more important than anything else

Customized Recipient (TO) control available or reuse existing built-in
How to create a control for an outlook add in that feels like the control for entered the TO addresses 
Soehnlein Andreas




Posts: 2
Joined: 2022-04-30
We are creating an Outlook Add-In that allows to archive selected emails into an existing CRM style application. For this the user can select an email and then is presented a new form that we develop in the add in that looks similar to when he would forward the email.

Instead of entering email addresses into a field label TO, the user can search and find projects that are stored in the CRM. The user experience should be similar to the normal TO field. So he can type in the text box and a lookup would show possible projects that he can then choose. He can also enter multiple projects just as I can in the normal TO/CC/BCC field.

What he can choose is different so we cannot, so it means we need to be able to get events when the control would search for suggestions in the dropdown list and we would access the web server of the CRM system to show suggestion based on the user's entry.

In Outlook it looks like this (TO):

https://snipboard.io/MagSAC.jpg

We need to be able to customize the data source of the lookup, how the lookup is displayed, what information is then display in the textbox (TO bar).

There are some similar controls like Devexpress TokenEdit (https://docs.devexpress.com/WindowsForms/17088/controls-and-libraries/editors-and-simple-controls/token-edit-control) or Telerik (https://docs.telerik.com/devtools/winforms/controls/editors/autocompletebox/autocompletebox) but naturally it is not the same like that of Outlook itself.

Is there any one that knows about a control that mimics the one from Outlook and is similar in the way it presents it self?

Thanks you for the any leads.
Posted 30 Apr, 2022 05:03:39 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Andreas,

That control is not available for developers.

I suppose you can have a number email addresses corresponding to your projects and instruct the end user to send emails to such an email address.

This may not be convenient though if you have tens of projects. In such a case, you could send all such emails to a single email address. To allow the end user specify the project, your add-in can provide a pane with a set of controls that lets the user choose a project; when the project is set you store it in a named MAPI property on the email; see https://www.add-in-express.com/forum/read.php?FID=5&TID=14156.

Then you intercept the ItemSend event - Add-in Express maps it to the ItemSend event of the Outlook Events component - detect the target recipient or the MAPI property, cancel the send operation, process the email so that it gets stored in your CRM, and remove the original email (or do something else with it).

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 03 May, 2022 05:12:47 Top