Hi there I'm trying to track, when a specific word files opens with windows services with these below technique but these Methods aren't working in windows services please help me, provide me a through which I can achieve that.
1. Dim wordApp As Microsoft.Office.Interop.Word.Application
wordApp = Marshal.GetActiveObject("Word.Application")
Exception occurred: Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
--------------------------------------------------------------
2. Dim p() As Process = Process.GetProcessesByName("winword")
For Each a In p
FileRecord.WriteLine("Name : {0}", a.MainWindowTitle)
'Above Line Write empty a.MainWindowTitle
Next
User contributions licensed under CC BY-SA 3.0