I am using vb.net 2003 ,to develop the programe to download the emails from outlook. its working properly. but i have one problem, whenn the start event run. i donot know when will all the email will be loaded . will any body help me to find out solution for this . following is there my code.
Dim oNS As Outlook.NameSpace
oNS = oApp.GetNamespace("mapi")
oNS.Logon(missing.Value, missing.Value, False, True)
Dim oInbox As Outlook.MAPIFolder
oInbox = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFo lderInbox)
Dim myStoreId As String = ""
myStoreId = oInbox.StoreID
Dim oSyncs As Outlook.SyncObjects
Dim oSync As Outlook.SyncObject
' Reference SyncObjects.
oSyncs = oNS.SyncObjects
oSync = oSyncs.Item(System.Configuration.ConfigurationSett ings.AppSettings("OutlookServer"))
' Send and receive.
oSync.Start()
Q : what i do here to know when all mails are downloaded in inbox