Don’t forget Window.Open, which is called after everything else. It can be a good spot to finalize settings. Don’t try to put everything in one place. Each of the four “Open” events has its purpose.
Doh! I get it now. I think I have my NewDocument stuff in App.Open which is causing the problem.
There is not any way though to know if App.Open occurs before OpenDocument or NewDocument?
i.e. you can’t guarantee which one will go first? If main app screen is not loaded I think it throws errors if I try to open a document.
“Main app screen” sounds like a window, and should be separated from any app.Open code. You might want to use a Timer to get an event that happens after everything (which I suspect is the subject of Tim’s link, above) and not have a default window set in your app. In the timer, open a new document if there isn’t one already open (WindowCount > 0).