← Foro de Visual Basic

mapFailure error 32002

Hilo en el foro de Visual Basic · 09 de Diciembre del 2003 · 0 respuestas
Unga09 de Diciembre del 2003
Pregunta
Estoy intentando enviar una archivo por correo pero en el còdigo me da este error, no tengo ni idea que puede ser ademàs la ayuda que trae el error solo me dice fallo inesperado, busque en msdn peroahì el error da cuando son varios archivos yo utilizo solo uno y es el mismo còdigo ahì les va:

Sub Main()
'Logon & Sync
MAPISession1.SignOn
'Create Message w/Attachments then Send
With MAPIMessages1
.SessionID = MAPISession1.SessionID
.Compose
.MsgSubject = "OCX - Test Message"
.RecipDisplayName = "[email protected]"
.ResolveName
'The value 2 is passed to the Space() function in the
'next line because there are two attachments to add.
'These spaces act as placeholders for the attachments.
.MsgNoteText = _
Space(2) & vbCrLf & _
"This message was sent from the MSMAPI32.OCX." & vbCrLf & _
"This message contains 2 attachments."
'Replace the AttachmentPathName values below as applicable...
.AttachmentIndex = 0
.AttachmentPosition = 0
.AttachmentPathName = ("c:Prueba1.txt")
' .AttachmentIndex = 1
' .AttachmentPosition = 1
' .AttachmentPathName = ("c:Prueba2.txt")
.Send
End With
MAPISession1.SignOff
End Sub

Gracias po su ayuda de antemano :)
¿Buscas más hilos como este? Mira el foro de Visual Basic o usa el buscador.