Click to See Complete Forum and Search --> : MAPI: unspecified failure 32002


Pieter Geert
May 10th, 2001, 01:10 PM
Hello all,
The following script will give an error "unspecified failure 32002" after sending 3-9 emails when I use attachments of 300 kb. With small attachments the script runs OK.
In the real script the emailaddress and attachments are changing.
After this I have to restart my application and mailprogram. This goes wrong with MS Exchange and MS Outlook.
Does anyone know what is wrong?

Code:

Dim i as Single
on error GoTo FoutMelding
With MAPISession1
.LogonUI = true
.NewSession = true
.SignOn
End With
for i = 1 to 25
With MAPIMessages1
.SessionID = MAPISession1.SessionID
.Compose
.RecipDisplayName = "my@address"
.MsgSubject = "testmail "
.MsgNoteText = "this is a test"
.AttachmentIndex = 0
.AttachmentPosition = 1
.AttachmentPathName= "c:\temp\mypic.jpg"
.AttachmentIndex = 1
.AttachmentPosition = 1
.AttachmentPathName = "c:\temp\mytext.txt"
.AttachmentIndex = 2
.AttachmentPosition = 2
.AttachmentPathName= "c:\temp\info.doc"
.Send false
End With
next

MAPISession1.SignOff
Exit Sub
FoutMelding:
MsgBox Err.Number & " " & Err.Description
MAPISession1.SignOff