A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

hide outlook to system tray



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 3rd 09, 02:41 PM posted to microsoft.public.outlook.program_vba
Mahmoud
external usenet poster
 
Posts: 2
Default hide outlook to system tray

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

Ads
  #2  
Old September 3rd 09, 03:17 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default hide outlook to system tray

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"mahmoud" wrote in message
...
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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Disappears in System Tray Andrew Morkunas[_2_] Outlook - General Queries 1 October 27th 08 07:00 PM
Shortcut to un-hide Outlook 2002 envelope in system tray? Zee Outlook and VBA 1 May 8th 07 09:04 PM
When I exit Outlook it goes to system tray, how do I kill it ? PT Outlook - Installation 2 January 25th 07 05:37 PM
Outlook 2003 System Tray Icon [email protected] Outlook - General Queries 21 November 14th 06 08:00 AM
Outlook Not Closing - Staying in System Tray Alan W Outlook - Installation 1 August 8th 06 09:13 PM


All times are GMT +1. The time now is 11:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.