Microsoft KB Archive/252708

= PRB: 32002 Error Message When You Send Mail to Multiple Recipients with MAPI Controls =

Article ID: 252708

Article Last Modified on 3/11/2004

-

APPLIES TO


 * Simple Messaging Application Programming Interface (MAPI)
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q252708



SYMPTOMS
A 32002 error message code may be returned when you attempt to send an e-mail to multiple recipients by using the MAPI controls that ship with Microsoft Visual Basic.



CAUSE
This error occurs when you set the RecipAddress property of the Message control to specify the recipient addresses. For example, the following code produces a 32002 error message when the Send method is executed: ' The code assumes that the Message control, mapMess, is located ' on the form, frmMain.

frmMain.mapMess.Compose

frmMain.mapMess.MsgSubject = "This is a subject." frmMain.mapMess.MsgNoteText = "This is a body."

frmMain.mapMess.RecipIndex = 0 frmMain.mapMess.RecipType = 1 frmMain.mapMess.RecipAddress = "me@here.com"

frmMain.mapMess.RecipIndex = 1 frmMain.mapMess.RecipType = 1 frmMain.mapMess.RecipAddress = "you@there.com"

frmMain.mapMess.AddressResolveUI = False frmMain.mapMess.ResolveName frmMain.mapMess.Send False



RESOLUTION
You can call ResolveName after setting each recipient to resolve this problem; for example: frmMain.mapMess.Compose frmMain.mapMess.AddressResolveUI = False

frmMain.mapMess.MsgSubject = "This is a subject." frmMain.mapMess.MsgNoteText = "This is a body."

frmMain.mapMess.RecipIndex = 0 frmMain.mapMess.RecipType = 1 frmMain.mapMess.RecipAddress = "me@here.com" frmMain.mapMess.ResolveName

frmMain.mapMess.RecipIndex = 1 frmMain.mapMess.RecipType = 1 frmMain.mapMess.RecipAddress = "you@there.com" frmMain.mapMess.ResolveName

frmMain.mapMess.Send False

Keywords: kbmsg kbprb kbctrl KB252708

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.