Taskpane in Word switch off/on

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

Taskpane in Word switch off/on
 
Andreas Waning




Posts: 33
Joined: 2011-06-27
Hello,

I have a taskpane in word. at Startup, I want to hide the taskpane and later I want to Show the taskpane.

Where can I hide the taskpane after Word startup. (in which Methode, which command ?)

How can I Show it, when the user clicks a Botton ?

Tanks,
Andreas
Posted 03 Dec, 2014 01:36:55 Top
Andreas Waning




Posts: 33
Joined: 2011-06-27
sorry the same question yesterday. I don´t see my post this morning.
Posted 03 Dec, 2014 01:41:51 Top
Andrei Smolin


Add-in Express team


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

I suppose I overlooked your other post yesterday.

You need to use ADXWordTaskPanesCollectionItem.CurrentTaskPaneInstance.Hide() and ADXWordTaskPanesCollectionItem.CurrentTaskPaneInstance.Show().

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Dec, 2014 02:18:26 Top
Andreas Waning




Posts: 33
Joined: 2011-06-27
Thanks.

But I Need a method to Hide the taskpane

I try this: (but this.adxWordTaskPanesCollectionItem1.CurrentTaskPaneInstance is null)



private void AddinModule_AddinInitialize(object sender, EventArgs e)
{
if(this.adxWordTaskPanesCollectionItem1.CurrentTaskPaneInstance != null)
this.adxWordTaskPanesCollectionItem1.CurrentTaskPaneInstance.Hide();
}

Where can I hide the taskpane at Startup ?
Posted 03 Dec, 2014 02:35:09 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
The best way to do this at startup is to set ADXWordTaskPane.Visible=false in the ADXWordTaskPane.ADXBeforeTaskPaneShow event.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Dec, 2014 02:38:22 Top