G
Guest
I am accessing Outlook from Access VBA and whilst the following code works
just fine it seems really slow to just show a list of the mail items that are
in the Inbox are there any suggestions on how this could be speeded up.
Set objFolder = objOutlook.GetNamespace("MAPI").GetDefaultFolder(MailBox)
With objFolder
lngCount = .Items.Count
If lngCount > 0 Then
For Each objOutlookMail In .Items
aryEmails(1, lngCount2) = Nz(objOutlookMail.To, "")
aryEmails(2, lngCount2) = Nz(objOutlookMail.Subject, "")
aryEmails(3, lngCount2) = objOutlookMail.Senton
lngCount2 = lngCount2 + 1
Next
End If
End With
Many thanks
just fine it seems really slow to just show a list of the mail items that are
in the Inbox are there any suggestions on how this could be speeded up.
Set objFolder = objOutlook.GetNamespace("MAPI").GetDefaultFolder(MailBox)
With objFolder
lngCount = .Items.Count
If lngCount > 0 Then
For Each objOutlookMail In .Items
aryEmails(1, lngCount2) = Nz(objOutlookMail.To, "")
aryEmails(2, lngCount2) = Nz(objOutlookMail.Subject, "")
aryEmails(3, lngCount2) = objOutlookMail.Senton
lngCount2 = lngCount2 + 1
Next
End If
End With
Many thanks