Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Word 2007 Custom Taskpane unavailable after loading a document

2 views
Skip to first unread message

Chris

unread,
Feb 13, 2007, 12:41:57 PM2/13/07
to
Hi,
I'm working in word 2007.
I created a new tab and an new ribbon. A button in the ribbon makes a call
to open a custom task pane which I initialize as a property of ThisAddIn
class. In the class like so.
In the ribbon class (Office.IRibbonExtensibility) I set my ribbon to
visible.

The problem is that once I load a document I can no longer activate the
taskpane. The buttons still fire and I can open custom windows forms but my
custom taskpane does not show.

Anyone know what I need to do to allow my custom taskpane to persist among
any open documents?

TIA,

Chris


qa...@gmx.at

unread,
Feb 14, 2007, 3:18:10 AM2/14/07
to
Hi there!
I had the same problem, and the solution is, let's say, a bit strange:
The main problem is that every DOCUMENT window of Word is an
APPLICATION window. That means that you can not attach your custom
task pane to a "main window", as you can do in Excel. For example, if
you start Word and have a blank document. Then you open a document and
get a new APPLICATION windows, which means that every custom task pane
you attached to the window on StartUp is attached to the first window
(which is now hidden!!!) and not to the one you have currently open.
The solution is, build up a Dictionary<Word.Window, CustomTaskPane>
and check/expand it with every WindowActivate event.
That's what has worked with me...

Good luck with that!
Q

Chris schrieb:

Chris

unread,
Feb 14, 2007, 10:31:26 AM2/14/07
to
Thanks for the info.

That nice video demo I watched on the MS website showing how easy everything
is left out what needs to be done to make it usable. That's kind of beat.
They show you how to do something that only works prior to opening your
first document...


<qa...@gmx.at> wrote in message
news:1171441090.1...@a75g2000cwd.googlegroups.com...

Jesper Stouenborg

unread,
Jul 27, 2010, 11:17:18 AM7/27/10
to
I have the same problem, and can't get the Dictionary<Word.Window, CustomTaskPane> fix to work...

Maybe you could you elaborate on that, maybe code snippet? :-)

Thanks,
Jesper

qanu wrote:

Hi there!
14-Feb-07

Hi there!
I had the same problem, and the solution is, let's say, a bit strange:
The main problem is that every DOCUMENT window of Word is an
APPLICATION window. That means that you can not attach your custom
task pane to a "main window", as you can do in Excel. For example, if
you start Word and have a blank document. Then you open a document and
get a new APPLICATION windows, which means that every custom task pane
you attached to the window on StartUp is attached to the first window
(which is now hidden!!!) and not to the one you have currently open.
The solution is, build up a Dictionary<Word.Window, CustomTaskPane>
and check/expand it with every WindowActivate event.
That's what has worked with me...

Good luck with that!
Q

Chris schrieb:

Previous Posts In This Thread:

On Tuesday, February 13, 2007 12:41 PM
Chris wrote:

Word 2007 Custom Taskpane unavailable after loading a document


Hi,
I'm working in word 2007.
I created a new tab and an new ribbon. A button in the ribbon makes a call
to open a custom task pane which I initialize as a property of ThisAddIn
class. In the class like so.
In the ribbon class (Office.IRibbonExtensibility) I set my ribbon to
visible.

The problem is that once I load a document I can no longer activate the
taskpane. The buttons still fire and I can open custom windows forms but my
custom taskpane does not show.

Anyone know what I need to do to allow my custom taskpane to persist among
any open documents?

TIA,

Chris

On Wednesday, February 14, 2007 3:18 AM
qanu wrote:

Hi there!


Hi there!
I had the same problem, and the solution is, let's say, a bit strange:
The main problem is that every DOCUMENT window of Word is an
APPLICATION window. That means that you can not attach your custom
task pane to a "main window", as you can do in Excel. For example, if
you start Word and have a blank document. Then you open a document and
get a new APPLICATION windows, which means that every custom task pane
you attached to the window on StartUp is attached to the first window
(which is now hidden!!!) and not to the one you have currently open.
The solution is, build up a Dictionary<Word.Window, CustomTaskPane>
and check/expand it with every WindowActivate event.
That's what has worked with me...

Good luck with that!
Q

Chris schrieb:

On Wednesday, February 14, 2007 10:31 AM
Chris wrote:

Thanks for the info.
Thanks for the info.

That nice video demo I watched on the MS website showing how easy everything
is left out what needs to be done to make it usable. That's kind of beat.
They show you how to do something that only works prior to opening your
first document...


<qa...@gmx.at> wrote in message
news:1171441090.1...@a75g2000cwd.googlegroups.com...


Submitted via EggHeadCafe - Software Developer Portal of Choice
Composite UI Pattern And Enterprise Settings
http://www.eggheadcafe.com/tutorials/aspnet/14dd2b7f-9da4-4a45-bc93-ce5fdba5c5ee/composite-ui-pattern-and-enterprise-settings.aspx

0 new messages