View Single Post
 
Old 12-18-2017, 08:42 AM
Welshgasman Welshgasman is offline Windows 10 Office 2007
Novice
 
Join Date: Jun 2011
Posts: 26
Welshgasman is on a distinguished road
Default

Hi Graham,
I have tried to adapt your code, and have the following
Code:
Dim objMsg As MailItem
......
Set objMsg = objSourceFolder.Items.Item(intCount)
and it appears to work for some mail messages but not all?
It fails with a Type Mismatch on the above line.

The original code had the variable type as variant?

It appears to fail in the inbox, but only after going through about 60 emails that will not be processed.?

Edit: I changed the variable objMsg to a variant in my code and your Getfolder proc and it works all the way through the folder?

Last edited by Welshgasman; 12-18-2017 at 08:52 AM. Reason: Added change for variant
Reply With Quote