This event enables commands to run when a document is opened. Notice that this counts for both a new document but also when a saved document is opened.
<event type="BaseExtensions:NewDocument" >
As an example, this can be used for running Autocorrect Management, where it is possible to open Office programs and use custom auto corrections. Read more about that in this article.
We have another event type called
NewDocumentNoEmbedded which should be used when you want the functionality of
NewDocument in Excel where it should only be triggered/run on "real" Excel document, and not on embedded Excel objects (in Word or PowerPoint). In this way,
NewDocumentNoEmbedded works exactly like
NewDocument, but does not get triggered on embedded OLE objects.