I am using the Office PIA to integrate an application into Word.
There are multiple word documents which run a macro when you open them. My goal is to lock the current document, but after the macro has run. Is there a way to do this? Thought something like this should work, but there is no such event like "MacroExecuted" or something else:
public void OpenDocument(string path)
{
var app = new Application();
app.Documents.Open(path);
app.ActiveDocument.MacroExecuted += LockDocumentEvent;
app.Visible = true;
}