Mail file and Welcome Page

Is there anyway in script to determine if the mail file opened inside a Welcome page or frame?

I’ve written code to execute some menu functions that open the password dialog via calls to the Windows API in the PostOpen event of the mail database. This works fine if the user opens the database directly. The menu calls are executed as expected. However, when the mail file is opened inside the Welcome page, the code executes (the Notes ID password dialog is brought up), but because on opening notes the focus is switched to the Welcome page, the password prompt closes immediately after opening.

The whole thing is an effort to automate acceptance of the password recovery file when the user opens the mail file. It all works perfect except if the user’s mail file is on the welcome page. If I could determine that I can code for it.

Any help would be appreciated.

Thanks.