C
Carsten Lahme
Hi NGs,
again I run into a 'litle' problem.
We have a VBA-Script in Outlook, that works fine. Now we want to
migrate this to a DLL using VS .NET 2k3
This is the part, where an error occurs:
Counter = 1
On Error GoTo ErrHandler
While Counter - 1 < NumAttachments
If Item.Attachments(Counter).Type <> 6 Then
Item.Attachments(Counter).delete()
NumAttachments = Item.Attachments.Count
Else
Counter = Counter + 1
End If
End While
It should remove all attachments but type of OLE of a mail-item.
If there are only one or two attachments, it works fine. Three or more
run into an error if the last attachment should be removed.
I also tried to use the remove-methode. that one runs, but doesn't
remove the attachments, if the mail is send -very strange but found in
other threads, too.
Can anyone explain and maybe give a solution?
rgds
Carsten
again I run into a 'litle' problem.
We have a VBA-Script in Outlook, that works fine. Now we want to
migrate this to a DLL using VS .NET 2k3
This is the part, where an error occurs:
Counter = 1
On Error GoTo ErrHandler
While Counter - 1 < NumAttachments
If Item.Attachments(Counter).Type <> 6 Then
Item.Attachments(Counter).delete()
NumAttachments = Item.Attachments.Count
Else
Counter = Counter + 1
End If
End While
It should remove all attachments but type of OLE of a mail-item.
If there are only one or two attachments, it works fine. Three or more
run into an error if the last attachment should be removed.
I also tried to use the remove-methode. that one runs, but doesn't
remove the attachments, if the mail is send -very strange but found in
other threads, too.
Can anyone explain and maybe give a solution?
rgds
Carsten