I have a C# program that creates a document from a template in Microsoft Word, and then inputs data into that document. The issue I am having is that while the program is populating the document, the user will switch to another word document and work on something else. As a result, the program "looses communication" with the document it was working on. This results in a lot of System.Runtime.InteropServices.COMException errors like 'Call was rejected by callee' and 'The RPC server is unavailable'
When a user is working on multiple Word Documents, how do I ensure the program "doesn't loose" the document it is suppose to work on?