Discussion:
Word 2007 Custom Taskpane unavailable after loading a document
(too old to reply)
Chris
2007-02-13 17:41:57 UTC
Permalink
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
q***@gmx.at
2007-02-14 08:18:10 UTC
Permalink
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
Post by Chris
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
Chris
2007-02-14 15:31:26 UTC
Permalink
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...
Post by q***@gmx.at
Hi there!
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
Post by Chris
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
Jesper Stouenborg
2010-07-27 15:17:18 UTC
Permalink
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 a
APPLICATION window. That means that you can not attach your custo
task pane to a "main window", as you can do in Excel. For example, i
you start Word and have a blank document. Then you open a document an
get a new APPLICATION windows, which means that every custom task pan
you attached to the window on StartUp is attached to the first windo
(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


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 a
APPLICATION window. That means that you can not attach your custo
task pane to a "main window", as you can do in Excel. For example, i
you start Word and have a blank document. Then you open a document an
get a new APPLICATION windows, which means that every custom task pan
you attached to the window on StartUp is attached to the first windo
(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


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..



<***@gmx.at> wrote in message news:***@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
Loading...