Word taskpane and baskstage interoperability RRS feed

  • Question

  • Is there any way to determine when the user has selected the file tab in Word 2010?

    I have a word taskpane that uses the VisibleChanged event to synchronize the taskpane with a ribbon button when the taskpane is closed by the user.  In Word 2010, when the user selects the file tab from the window with the taskpane the VisibleChanged event fires and indicates that the taskpane is invisible.  Then, after performing an operation on the file menu (or selecting a different tab), the VisibleChanged event fires again indicating that the taskpane is visible.

    That would be OK if everything on the file menu behaved the same.  However, the "new" button is particularly difficult because the VisibleChanged events don't seem to sychronize with the proper window.  For example, the VisibleChanged event fires when the new document loads and becomes the active document, even though the taskpane is assigned to the window that the file tab was selected from, not the new document.

    Another peculiarity is that the VisibleChanged event only seems to fire the first time the file tab is selected in a window.  Subsequent selections of the file tab do not generate a VisibleChanged event.

    As a result, I would like to ignore the VisibleChanged events when the file tab is selected.

    Also, I should have clarified, I am using Visual Basic on Visual Studio 2010 and targeting Office 2010 and NET 4.0
    • Edited by J Michelsen Monday, October 24, 2011 10:04 PM
    Monday, October 24, 2011 9:51 PM


All replies