Sidharth Mudgal Sidharth Mudgal - 1 month ago 20
C# Question

Documents.Close makes Word visible

I have been trying a workaround for this, for quite a long time, but haven't found one yet.
On calling

Documents.Close()
, Word, which was opened with
visible = false
, becomes visible.

This is my close statement (document is already saved so no need to save again):

WordApp.Documents.Close(Word.WdSaveOptions.wdDoNotSaveChanges,
Word.WdOriginalFormat.wdOriginalDocumentFormat);

Answer

You could just call WordApp.Quit().

Comments