L
Leon Mayne
Hi all,
I have a bit of code that loops through the emails the user has selected,
processing them and deleting them at the end, but it seems to be having
problems all of a sudden. After it processes the first email, it crashes
when I try to get the next email's entryid:
For x = 1 To oOL.ActiveExplorer.Selection.Count
strID = oOL.ActiveExplorer.Selection.Item(x).EntryID
strStoreID = oOL.ActiveExplorer.Selection.Item(x).Parent.StoreID
-- Do stuff --
oOL.ActiveExplorer.Selection.Item(x).Delete
Next
It crashes on the strID line. It seems to be related to the delete line,
because if I comment out the delete line it works OK. It also seems to be
time dependent, because if I click 'debug' on the error message and then
click 'start' it carries on OK (but crashes on the next loop etc). The error
message just says "Run time error '-1767636721 (96a4010f)': The operation
failed".
Can anyone help?
I have a bit of code that loops through the emails the user has selected,
processing them and deleting them at the end, but it seems to be having
problems all of a sudden. After it processes the first email, it crashes
when I try to get the next email's entryid:
For x = 1 To oOL.ActiveExplorer.Selection.Count
strID = oOL.ActiveExplorer.Selection.Item(x).EntryID
strStoreID = oOL.ActiveExplorer.Selection.Item(x).Parent.StoreID
-- Do stuff --
oOL.ActiveExplorer.Selection.Item(x).Delete
Next
It crashes on the strID line. It seems to be related to the delete line,
because if I comment out the delete line it works OK. It also seems to be
time dependent, because if I click 'debug' on the error message and then
click 'start' it carries on OK (but crashes on the next loop etc). The error
message just says "Run time error '-1767636721 (96a4010f)': The operation
failed".
Can anyone help?