DocumentBase.New Event

Occurs when a new document is created.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public event DocumentEvents2_NewEventHandler New

This event is only raised when a new document is created from a template.

The following code example creates an event handler to display a message when a new document is created. To use this example, run it from the ThisDocument class in a Word Template project.

private void DocumentNew()
    this.New += new Microsoft.Office.Interop.Word.

void ThisDocument_New()
    MessageBox.Show("The Document.New event has fired.");

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft