First of all, I am unsure as to where to post it, so please let me know (or move it) to where it should be.
I create an instance of word as follows
Questions:
1)
Word.Applicatio nClass wd = new Word.Applicatio nClass();
creates the winword.exe process,right?t hen...how can I get the Process Id of that word instance I have just created?thus I can kill it at a later stage by
2) When I open word using my app, the caption appears as "My Word", however sometimes (haven't been able to reproduce it always) when I open word using the shortcut to microsoft word 2007, the word document also has the "My Word" caption...Other times, it shows the expected caption "Document1" , etc...Why is this happening?Where could I get in-depth information about Word.Applicatio nClass?
If anyone can bring some light to these issues...
Many thanks
I create an instance of word as follows
Code:
Word.ApplicationClass wd = new Word.ApplicationClass();
wd.Caption = "My Word";
int wordHandle = FindWindow("Opusapp", wd.Caption);
1)
Word.Applicatio nClass wd = new Word.Applicatio nClass();
creates the winword.exe process,right?t hen...how can I get the Process Id of that word instance I have just created?thus I can kill it at a later stage by
Code:
Process[] wordProcesses = Process.GetProcessesByName("WINWORD");
foreach (Process p in wordProcesses)
{
if (p.Id = myProcessId)
p.Kill;
}
If anyone can bring some light to these issues...
Many thanks
Comment