hide outlook to system tray

  • Thread starter Thread starter mahmoud
  • Start date Start date
M

mahmoud

I want to force users to open outlook 2003 at windoos startup
I found the following :

set shell = createobject("wscript.Shell")
shell.run "outlook.exe", 7, False '... SH_SHOWMINNOACTIVE=7 "should" work
wscript.Sleep 4000 '... may need tweaking 1000=1second
success = shell.appactivate("Outlook Today - Microsoft Outlook") '... window
must match first screen
if success then shell.sendkeys "% n" ' ... Minimize Alt Space Bar - n

i published by group polciy as login script it work just fine
but i need outlook to be hide to system tray how can i do that by login
script ?
any help
 
If you were to use the Outlook object model you'd set the
Application.Explorers.Item(1).WindowState = olMinimized. Or
ActiveExplorer.WindowState.

Using only Win32 API calls you have to post a message to that window's hWnd
to minimize.
 
Back
Top