こんにちは、MS-Word でいくつかのファイルを開くために相互運用機能を使用しています。正常に動作します。問題は、既に開いているファイルを開こうとすると動作しないことです。使用中のファイルのダイアログ ボックスがタスク マネージャーに表示されます。タスクマネージャーでクリックするだけでアクセスできます。どうすれば表示できますか? または、これを行う別の方法を提案できますか?
Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();
WordApp.DisplayAlerts = WdAlertLevel.wdAlertsAll;
Microsoft.Office.Interop.Word.Document WordDoc = new Microsoft.Office.Interop.Word.Document();
WordDoc = WordApp.Documents.Open(path, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing);
WordApp.Visible = true;
System.Runtime.InteropServices.Marshal.ReleaseComObject(WordApp);