Add button to both TabHome and TabMail

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

Add button to both TabHome and TabMail
Reuse gui and functionality 
Mads




Posts: 28
Joined: 2010-10-22
Hi,


How can I create a bunch of controls and add the same controls to the first tab of both Word and Outlook. The IdMso for Word is "TabHome" and Outlook uses "TabMail".

In InitializeComponent the CurrentInstance.HostType is Nothing and after InitializeComponent something like below dosent seem to work.

Me.AdxRibbonTab1.IdMso = IIf(CurrentInstance.HostType = AddinExpress.MSO.ADXOfficeHostApp.ohaOutlook, "TabMail", "TabHome")

--
Mads
Posted 08 Jan, 2014 08:27:04 Top
Dmitry Kostochko


Add-in Express team


Posts: 2841
Joined: 2004-04-05
Hi Mads,

The HostType property is not initialized when the InitializeComponent method is being executed. I would suggest that you move this code line to the OnRibbonBeforeCreate event handler.
Posted 08 Jan, 2014 08:43:20 Top
Mads




Posts: 28
Joined: 2010-10-22
Hi,

That seems to work :)
Thank you very much.

--
Mads
Posted 08 Jan, 2014 08:54:06 Top