Tracking with windows services

0

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
.net
vb.net
service
windows-services
interopservices
asked on Stack Overflow Dec 5, 2017 by Salahudin Malik • edited Dec 6, 2017 by Salahudin Malik

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0