VB Scripting for OUTLOOK

January 14, 2012 at 01:00:30
Specs: Microsoft Windows Server 2003
Hi,
I need help in writing a script for outlook 2003.
I want to run outlook using the script,
Then the script should be able to minimize the outlook windows,
After that I need to do send & receive
And in the last, script should be able to close the outlook properly.
Can anyone help..?
Presently I am using different scripts to run outlook and close it...
Both working fine the only problem is I am using sendkey(F9) to do send and receive and it only works if outlook window is active.
And plus I want add one more thing, I should also be able to minimize the outlook with this script so that it wont bother other’s when they logon to the computer.

See More: VB Scripting for OUTLOOK

Report •

#1
January 14, 2012 at 01:18:01
Hi,
Already opened your Outlook, actually what type of problem Regarding

Report •

#2
January 14, 2012 at 21:44:59
Hi,
I need help in writing a script for outlook 2003.

This is what i want the script to do for me..

1.) I want the script to run outlook and select a mentioned profile,
2.) Then the script should be able to minimize the outlook window,
3.) After that I need to do send & receive,
4.) And in the last, script should be able to close the outlook properly.

Can anyone help..?

Presently I am using a scripts to run outlook do send and recieve and then close it...
Its working fine the only problem is I am using sendkey(F9) to do send and receive and it only works if outlook window is active.
And plus I want add one more thing, I should also be able to minimize the outlook with this script so that it wont bother other’s when they logon to the computer.


My prsent Script is

<package>
<job id="vbs">
<script language="VBScript">
set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "outlook /profile registration"
WScript.Sleep 20000

WshShell.AppActivate "Outlook"
WScript.Sleep 1000

WshShell.SendKeys "{F9}"
WScript.Sleep 28000

Dim oOL 'As Outlook.Application
Set oOL = GetObject(, "Outlook.Application")
If oOL Is Nothing Then
'no need to do anything, Outlook is not running
Else
'Outlook running
oOL.Session.Logoff
oOL.Quit
End If
Set oOL = Nothing

</script>
</job>
</package>


Report •
Related Solutions


Ask Question