//for powerpoint instance ppApp = new Microsoft.Office.Interop.PowerPoint.Application(); //for word instance wordApp = (Microsoft.Office.Interop.Word.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Word.Application");
Process[] wordProcs = Process.GetProcessesByName("WINWORD"); if (wordProcs.Length > 0) { foreach (Process wordProc in wordProcs) { if (wordProc.MainWindowTitle != "") { //Do something here } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)