Access to Word built-in TaskPane

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

Access to Word built-in TaskPane
 
DOMKE PETER




Posts: 21
Joined: 2009-06-28
Hello,

my add-in uses Word 2003 / 2007 as host application. I need to make one of the built-in Word taskpanes visible after a certain action. In the Word VBA editor I can do this with:

Application.TaskPanes.Item(wdTaskPaneFormatting).Visible = True

In a VSTO 2007 addin I can use the line:
Globals.ThisAddIn.Application.TaskPanes(Word.WdTaskPanes.wdTaskPaneFormatting).Visible = true

However, I cannot access the taskpanes collection when working in the AddinModule; the Word._Application interface does not provide access. I've already looked up the keywords in the forum and the help file, but found nothing.

What is the correct way?
Thanks
Peter Domke
Posted 28 Jun, 2009 12:26:37 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Peter,

Looks like you use version-neutral interops (they are interops for Outlook 2000, in fact) and the Appplication.TaskPanes property was introduced in a sudsequent version. Try replacing the corresponding references in your add-in project.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Jun, 2009 09:16:05 Top
DOMKE PETER




Posts: 21
Joined: 2009-06-28
You've been right. I was using the version-neutral interops. After changing to the Office Interops and some hassling with the references I can access the TaskPane property.

Thank you.
Peter Domke
Posted 29 Jun, 2009 11:16:37 Top