I have a form in Access that retrieves a list of unread emails from outlook using the following code:
For Each mailoutlook in folderOutlook.Items
If mailoutlook.UnRead = True Then
'Add to rowsource of list box here
End if
Next
This has worked fine until I got a Non Delivery Report in my inbox. The code bombed out on the Next when it got to the NDR. The error code is 13: Type Mismatch. Looking at the messages by linking Access to my Inbox I discovered that the MessageClass of the NDR is different from a standard email: it is REPORT.IPM.Note.NDR rather than IPM.Note.
Has anyone experienced this? Apart from checking the error number and resuming next is there a way to work around this? It would be useful to have NDRs display on my form.
Thanks,
Peter
Datawise Computing
For Each mailoutlook in folderOutlook.Items
If mailoutlook.UnRead = True Then
'Add to rowsource of list box here
End if
Next
This has worked fine until I got a Non Delivery Report in my inbox. The code bombed out on the Next when it got to the NDR. The error code is 13: Type Mismatch. Looking at the messages by linking Access to my Inbox I discovered that the MessageClass of the NDR is different from a standard email: it is REPORT.IPM.Note.NDR rather than IPM.Note.
Has anyone experienced this? Apart from checking the error number and resuming next is there a way to work around this? It would be useful to have NDRs display on my form.
Thanks,
Peter
Datawise Computing