M
Medes
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;
}
}
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;
}
}