diff --git a/PROMS/DataLoader/Documents.cs b/PROMS/DataLoader/Documents.cs index 738d2f0f..7ef31315 100644 --- a/PROMS/DataLoader/Documents.cs +++ b/PROMS/DataLoader/Documents.cs @@ -221,6 +221,8 @@ namespace DataLoader { try { + // RHM 20100628 - All of a sudden, this was null and would not work. + // I added the else clause so that the WinWord process would be terminated. if (myWordDoc != null) { WordDoc.CloseApp(); @@ -228,6 +230,13 @@ namespace DataLoader while (WordDoc.WordProcesses.Length > 0) Application.DoEvents(); } + else + { + WordDoc.KillWordApps(); + Application.DoEvents(); + while (WordDoc.WordProcesses.Length > 0) + Application.DoEvents(); + } } catch (Exception ex) {