RE: Word Add-In does not work correctly



Thank you so much,

I assigned a value to my button and now works across multiple application
but with a little bugg,

my button shows a form when you click it, the form contains the property of
the doc file, now if i have more than one instance of word (more than one
..doc file opened)
when i click my button it shows just shows one form (the first one).

"Cindy Meister" wrote:

This sounds very much like you haven't assigned a value to the buttons' TAG
property so that Word. If you don't do that, then the buttons can't work
across multiple document windows. This is documented in the articles on the
MSDN site concerned with creating COM Addins for Office applications.
--
-- Cindy


"Medes" wrote:

Hi,

I have created a Shared Add-In for MS Word (2003) but it does not work
correctly,

It works good if you double click on a .doc file and open it directly and it
works good if you open a new instance of word .

the problem is if you have already opened a file or an instance of word and
you go to ( File -> open ) to open an existing file. it stops work. I see my
button but when i click it nothing happed, no Errors . it just does not
answer.
here is a little bit of my code:

public class Connect : Object, Extensibility.IDTExtensibility2
{
public void OnConnection(object application,
Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array
custom)
{
applicationObject = application;
addInInstance = addInInst;
wordApp = (Word.Application)application;
CommandBar toolBar = AddWordToolbar(wordApp, "Ignito Toolbar");
}
public void OnDisconnection(Extensibility.ext_DisconnectMode
disconnectMode, ref System.Array custom)
{
}

public void OnAddInsUpdate(ref System.Array custom)
{
}

public void OnStartupComplete(ref System.Array custom)
{
}

public void OnBeginShutdown(ref System.Array custom)
{
MyButton.Enabled = false;
}
}


.