How to add button to toolbar of Outlook window appears after choosing ?Â?Ð?ìSend to Mail > Recipient?Â?Ð?í on file.

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

How to add button to toolbar of Outlook window appears after choosing ?Â?Ð?ìSend to Mail > Recipient?Â?Ð?í on file.
 
David Potashinsky


Guest


We have a problem to add toolbar button to ?Â?Ð?ìSend to > Mail Recipient?Â?Ð?í windows of outlook.

Regular button is added to outlook by fallowing code and works fine:

public class AddInFramework : AddinExpress.MSO.ADXAddinModule
{
private ADXOlInspectorCommandBar m_SIInspectorCommandBar;
private ADXCommandBarButton m_MyOutlookMailButton;
?Â?Ð???Â?Ð???Â?Ð???Â?Ð??
private void InitializeComponent()
{
this.m_SIInspectorCommandBar = new AddinExpress.MSO.ADXOlInspectorCommandBar(this.components);
this.m_MyOutlookMailButton = new AddinExpress.MSO.ADXCommandBarButton(this.components);


this.m_MyOutlookMailButton.Caption = Constants.MY_BUTTON_CAPTION;
this.m_MyOutlookMailButton.ControlTag = "1cb783f1-d73b-4b33-84ca-3efc30f6111a";
this.m_MyOutlookMailButton.Image = 0;
this.m_MyOutlookMailButton.ImageList = this.m_ShieldBitmap16ImageList;
this.m_MyOutlookMailButton.ImageTransparentColor = m_ShieldBitmap16ImageList.TransparentColor;
this.m_MyOutlookMailButton.St yle = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.m_MyOutlookMailButton.Temporary = true;
this.m_MyOutlookMailButton.TooltipText = BUTTON_TOOLTIP;
this.m_MyOutlookMailButton.UpdateCounter = 14;
this.m_MyOutlookMailButton.Click += new AddinExpress.MSO.ADXClick_EventHandler(this.MyOutlookMailButton_Click);


this.m_SIInspectorCommandBar.CommandBarName = "E-mail";
this.m_SIInspectorCommandBar.CommandBarTag = "0a1eac80-e60d-4943-be4b-e00642e395ce";
this.m_SIInspectorCommandBar.Controls.Add(this.m_MyOutlookMailButton);
this.m_SIInspectorCommandBar.Temporary = true;
this.m_SIInspectorCommandBar.UpdateCounter = 22;
}

The problem is happening than user right click on some file, choose ?Â?Ð?ìSend To?Â?Ð?í > ?Â?Ð?ìMail Recipient?Â?Ð?í in context menu of file. New window of outlook is opened but with no button added by our code.

How can we solve it?

The problem is appears on windows XP (SP3) / Outlook 2003 (SP3).

Thank you in advance,
We bought your product and so far we are pleased with it.
David.
Posted 14 Feb, 2010 04:50:39 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hi David,

Thank you for the kind words.

Unfortunately, your problem is a well-known Outlook issue: it doesn't fire InspectorActivate for inspector windows opened in this way. You can try tracking open inspectors and run that code if you find an inspector that is opened without being checked by you. But there is a problem: you cannot use the Outlook object model as well as other Office object models in a thread because the object models are not thread-safe. So, the true workaround would be counting Inspector windows using Win32 API. This is a hard way but it seems there's no other one.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Feb, 2010 04:11:40 Top
Shmulik Peled


Guest


Hi Andrei,

My colleague David is asking about the button that we have added using AddinExpress infrastructure.
are you saying that because of Outlook send-to problem this feature of AddinExpress doesn't work
when doing send-to message?

Thanks again,
Shmulik.
Posted 21 Feb, 2010 15:14:09 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hi Shmulik,

Yes, that's true. Note that Microsoft had known about the issue and they solved it in Outlook 2007 inspectors.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Feb, 2010 04:45:48 Top