void Application_WindowActivate(Microsoft.Office.Interop.Word.Document Doc, Microsoft.Office.Interop.Word.Window Wn) { try { // Template.GetInstance().DisplayBJLetter(); Word.Document docCurr = this.Application.ActiveDocument; if (!String.IsNullOrWhiteSpace(docCurr.Path)) { //Template.GetInstance().DisplayBJLetter(); if (!TestDocu.ContainsKey(Doc)) { TestDocu.Add(Doc, true); Template.GetInstance().DisplayBJLetter(); } // Otherwise, the doc is already in the set of open documents, hence we know the document is already open else { if (TestDocu[Doc] == false) { //Console.WriteLine(doc.Name + " is already open!"); Template.GetInstance().DisplayBJLetter(); } } } //if (initialized == false) //{ // Word.Document doc = this.Application.ActiveDocument; // if (String.IsNullOrWhiteSpace(doc.Path)) // { // } // else // { // initialized = true; // Template.GetInstance().DisplayBJLetter(); // } //} } catch (Exception ex) { Logger.LogWriter(ex.StackTrace); } }
private void Application_WindowActivate(Microsoft.Office.Interop.Word.Document Doc, Microsoft.Office.Interop.Word.Window Wn) { try { CreateCiNiuTaskPane(); } catch (Exception ex) { } }