tags:

views:

57

answers:

0

i created one shared Add-ins in visual studio 2005 all events working fine but new document event is not working i don't know why my code for new document is

((Word.ApplicationEvents4_Event)wb).NewDocument += new Word.ApplicationEvents4_NewDocumentEventHandler(Application_NewDocument);


void Application_NewDocument(Word.Document Doc)
        {
            MessageBox.Show("New: " + wb.ActiveDocument.Name);
            openingTime = DateTime.Now.ToLocalTime();
        }