Nathan
Nathan

Reputation: 6531

Word interop, disabling save prompt

How do you disable the save prompt.

class WordDocument
{
    Word.Document document; 

    public WordDocument(string filepath,Word.Application application)
    {
        document = application.Documents.Open(filepath);
    }

    public void Save()
    {
        document.Save();
        //need to remove prompt
    }
}

Upvotes: 0

Views: 1224

Answers (1)

Florin V
Florin V

Reputation: 344

To remove the propt to save windows set application.DisplaAlerts = false before saving the doc

Upvotes: 2

Related Questions