Outlook Send & Recieve in VBScript -
02-14-2005
, 04:45 PM
Hi All,
I have developed the following code to synchronize the users Email folders
' Connect to outlook
Set OLApp =
WScript.CreateObject("Outlook.Application", "SyncObject_")
' Connect to Mapi Client
Set OLMAPI = OLApp.Getnamespace("mapi")
' Connect to OL Sync Objects
Set OLSyncs = OLMAPI.SyncObjects
' Connect to default Sync Objects
Set OLSync=OLSyncs.Item("All Accounts")
' Synchronize EMails
OLSync.start
This starts the send and receive of outlook fine, but the script finishes
before the send and receive has completed.
The SyncObject has some events called ‘syncend’, ‘progress’ and ‘onerror’
but since these are events and not properties or methods of the SyncObject, I
am finding it hard to check the progress of the synchronization.
The examples I can find on MSDN and other site are for VB and not VBScript.
Is there a way of doing this in VBScript.
Any ideas?
--
Thanks ;-)
Insp. Gadget |