w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Identify process id of word instance using System.Diagnostics.Process object

What about that (untestet):


Word.Application wdapp;
    Process wordProcess = System.Diagnostics.Process.Start("Path to
    wdApp =
catch (COMException) 
     Type type = Type.GetTypeFromProgID("Word.Application");
     wdapp = System.Activator.CreateInstance(type);

The wdApp should be the started word. And you get the process id through wordProcess instance.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.