Microsoft.Office.Interop.Word.Application objWord; objWord=(Microsoft.Office.Interop.Word.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Word.Application"); for (int i = 0; i < objWord.Windows.Count; i++) { object a = i+1; Window objWin = objWord.Windows.get_Item(ref a); MessageBox.Show(objWin.Caption); }
foreach(Document doc in WordApp.Documents) { //your logic here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)