M
mdupris
I'm writing a C# wrapper for MS Word to run on systems where VBA is
not installed -- nor can it be (by policy). When I write event
handlers like the following:
gWordApp = new Word.ApplicationClass();
gWordAppEvents =
(Microsoft.Office.Interop.Word.ApplicationEvents2_Event)gWordApp;
gWordAppEvents.Quit += new
Microsoft.Office.Interop.Word.ApplicationEvents2_QuitEventHandler(quitWordEventHandler);
when quitting Word the "The function you are attempting to run
contains macros ..." pops up. There are no macros anywhere in the
sytem (the document, normal.dot, ....). If I drop the event handler,
the message doesn't appear and things are fine -- except for the fact
that I can't trap the events I need.
Does anyone know what's going on here, or have work-around?
not installed -- nor can it be (by policy). When I write event
handlers like the following:
gWordApp = new Word.ApplicationClass();
gWordAppEvents =
(Microsoft.Office.Interop.Word.ApplicationEvents2_Event)gWordApp;
gWordAppEvents.Quit += new
Microsoft.Office.Interop.Word.ApplicationEvents2_QuitEventHandler(quitWordEventHandler);
when quitting Word the "The function you are attempting to run
contains macros ..." pops up. There are no macros anywhere in the
sytem (the document, normal.dot, ....). If I drop the event handler,
the message doesn't appear and things are fine -- except for the fact
that I can't trap the events I need.
Does anyone know what's going on here, or have work-around?