Hi.
I'm also very much interested in this.
I'm writing a companion product for Word. (but not a plugin).
From the companion app, I need to find Word instance of a given filename.
But it doesn't seem to work.
If I have 3 word instances open, and I do this:
Application.GetActiveInstances() returns 3 applications,
but window is always the same, first instance.
How can I get to the file I need?
Many thanks.
I'm also very much interested in this.
I'm writing a companion product for Word. (but not a plugin).
From the companion app, I need to find Word instance of a given filename.
But it doesn't seem to work.
If I have 3 word instances open, and I do this:
foreach (Application word_application in Application.GetActiveInstances())
{
foreach (Window window in word_application.Windows)
{
if (filename == window.Document.FullName)
{
//Do good stuff here
}
}
}
it doesn't work. Application.GetActiveInstances() returns 3 applications,
but window is always the same, first instance.
How can I get to the file I need?
Many thanks.