Hello,
Just ignore the mesasge, How ?
Here the way,
wordApp.DisplayAlerts = WdAlertLevel.wdAlertsNone;
it help me in excel application.
Hope it will help
yaron.
"(E-Mail Removed)" wrote:
> I hit the "Send" button by accident while composing the above. A more
> complete version of code showing the issue is:
>
> ....
> public Word.Application gWordApp;
> public Microsoft.Office.Interop.Word.ApplicationEvents2_Event
> gWordAppEvents;
>
> ....
> gWordApp = new Word.ApplicationClass();
> gWordAppEvents =
> (Microsoft.Office.Interop.Word.ApplicationEvents2_Event)gWordApp;
> gwordAppEvents.Quit += new
> Microsoft.Office.Interop.Word.ApplicationEvents2_QuitEventHandler(quitWordEventHandler);
> gWordApp.Visible = true;
>
>
> private void quitWordEventHandler()
> {
> ....
> }
>
> = M =
>
>
> On Aug 14, 2:05 pm, mdup...@hotmail.com wrote:
> > 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(quitWordE-ventHandler);
> >
> > 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?
>
>
>
|