Answer the question
In order to leave comments, you need to log in
Why does the event handler not fire completely?
Hello everyone, there is a small WPF program, it has a button responsible for sending data to Word, but when you click on the button, nothing happens (more precisely, it only saves, but the Word document does not open, although this is written in the code)
If you click the button again time, then the handler will be executed normally, what could be the reason?
GIF
Button code
Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.Application();
Document doc = app.Documents.Add(Visible: true);
doc.Save();
app.Documents.Open(@"C:\1.docx");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question