I'm using Word interop to create a new instance of Word, and load a document into that instance. I'm using the same technique shown here, except instead of creating a new document, I'm loading an existing one.
This is working fine, except in the following situation.
1. There is already a copy of Word running, with a document open.
2. After the program uses interop to start creating a new Word instance, and before that instance starts loading the document, the user clicks on the existing Word instance that is running on its own, giving it focus.
3. When the interop Word finishes loading the document, the two Word instances switch. The document that was loaded using interop is loaded into the existing Word application, and the document that was loaded into the existing Word application is loaded into the Word application that was created using interop.
Is this a known bug with Word interop? I've been searching for quite a bit and haven't found anything resembling this behavior. If someone could even point me to a thread somewhere of someone seeing this behavior, I'd appreciate it.
Thanks.