Word Add In & Command Bars...

  • Thread starter Brian McCullough
  • Start date
B

Brian McCullough

Hello,

I have a Word Add In (Word XP), and in this add in, I create a custom
commandbar with a single button on it. I put this custom command bar after
all other command bars.

This command bar button displays a custom document property associated with
the current document. When clicked, the button displays a dialog with 3
options for the user to change the value of the custom document property and
redisplay the newly seclected value in the button. When the user switches
from document to document (they may have multiple open at a time), the
command bar button should reflect the custom document property of the
current document. Pretty simple right!!??!?!

I have something working, sort of...What is the correct way to add this
button to the command bar???? Is there an article out there that explains
this??

Here are some gripes about my current implementation:

1. When I switch between documents, the command bar button on "inactive"
documents switches with the current value, but when I activate the document,
it is redisplayed with the correct value.

2. When opening a New outlook message (Word is the email editor) I get the
command bar in there too. Chaning the value here changes the value on the
last Word document window.

It is like each Word document is "sharing" the command bar with the other
documents. Is this correct? I would think it would be similar to Outlook
where each Inspector has it's own set of command bars....Is there something
I am missing??

Thanks in advance!!

-Brian
 
P

Pete

Hi Brian,

I think I am right in saying this: there is only one instance of a Word
application running on your computer regardless of the number of open
documents or whether you are using Word as an email editor. Therefore there
is only one instance of your add-in running at any time. This also means that
the Word app can only have one active document and your add-in will reference
this. Does that make things any clearer?

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top