MAPI and outlook
Hi, everyone
I have a problem when using MAPI in MS outlook 2000.
My application uses MAPI to send the e-mail with a .pdf attachement.
It works fine when using MS outlook express, but when I try to send using MS outlook 2000 it keeps giving me the "error 32002"
My outlook configuration is using Workgroup or Corporation and I select outlook as my e-mail service but I don't use MS exchange server. Following are my sample code:
sesMail.DownLoadMail = False
sesMail.SignOn
If sesMail.SessionID = 0 Then
MsgBox "Unable to connect.", vbExclamation, App.Title
Else
With msgMail
.SessionID = sesMail.SessionID
.Compose
.MsgSubject = sSubj
.MsgNoteText = sBody
If iAddressBook = 0 Then
For i = 0 To UBound(sTos)
.RecipIndex = i
.RecipType = 1
.RecipAddress = sTos(i)
Next i
For i = 0 To UBound(sCcs)
.RecipIndex = UBound(sTos) + 1 + i
.RecipType = 2
.RecipAddress = sCcs(i)
Next i
End If
.AttachmentPathName = sPath & sFile
.AttachmentName = ""
.Send True
End With
End If
sesMail.SignOff
Kill sPath & sFile
Screen.MousePointer = vbDefault
End If
I will appreciate any suggestions.
yuelie
|