Quantcast
Viewing all articles
Browse latest Browse all 3066

Application_Startup() not firing

I am trying to create a function that will run when Outlook starts up.  I have activated the developers tab and changed the macro security to allow all.  I created a test sub that only maximizes the window.  It works if I play it after Outlook loads, but it does not run automatically when Outlook starts.  What am I missing?  I was  originally trying to show a msgbox also, but I commented that out.  I thought it might be trying to display before the environment was ready.

Script:


Private Sub Application_Startup()
 
' MsgBox "Welcome, " & Application.GetNamespace("MAPI").CurrentUser
 
 Application.ActiveExplorer.WindowState = olMaximized
 
End Sub

Viewing all articles
Browse latest Browse all 3066

Trending Articles