eric07
asked on
Using MAPI Active X Control and attachments.
Hi I'm trying to add an attachment to an email application.
I can create the email and send it but I keep getting an error every time I try and attach text file like so:
I've logged on the MAPI server already
MAPIMess.Action = 6
MAPIMess.RecipIndex = 0
MAPIMess.RecipDisplayName = "eric07@earthlink.net"
MAPIMess.MsgSubject = "This is a test"
MAPIMess.Action = 3
will send the email and I receive it ok
but know to add the code to add the
autoexec.bat as an attachment I get errors.
MapiMess.AttachmentIndex = MapiMess.AttachmentCount
MapiMess.AttachmentName = "autoexec.bat"
MapiMess.AttachmentPathNam e = "c:\autoexec.bat"
MapiMess.AttachmentPositio n = MapiMess.AttachmentIndex
MapiMess.AttachmentType = 0
MAPIMess.Action = 3
can anyone help figure this out.
Thanks
I can create the email and send it but I keep getting an error every time I try and attach text file like so:
I've logged on the MAPI server already
MAPIMess.Action = 6
MAPIMess.RecipIndex = 0
MAPIMess.RecipDisplayName = "eric07@earthlink.net"
MAPIMess.MsgSubject = "This is a test"
MAPIMess.Action = 3
will send the email and I receive it ok
but know to add the code to add the
autoexec.bat as an attachment I get errors.
MapiMess.AttachmentIndex = MapiMess.AttachmentCount
MapiMess.AttachmentName = "autoexec.bat"
MapiMess.AttachmentPathNam
MapiMess.AttachmentPositio
MapiMess.AttachmentType = 0
MAPIMess.Action = 3
can anyone help figure this out.
Thanks
ASKER
Runtime error: '32002'
Unspecified failure has occured
MAPIMess.MsgSubject = "This is a test"
MAPIMess.AttachmentIndex = MAPIMess.AttachmentCount
MAPIMess.AttachmentIndex = MAPIMess.AttachmentIndex
MAPIMess.AttachmentName = "autoexec.bat"
MAPIMess.AttachmentPathNam e = "c:\autoexec.bat"
MAPIMess.MsgNoteText = "Note Text"
MAPIMess.AttachmentPositio n = Len(MAPIMess.MsgNoteText)
MAPIMess.AttachmentType = 0
Thanks
Unspecified failure has occured
MAPIMess.MsgSubject = "This is a test"
MAPIMess.AttachmentIndex = MAPIMess.AttachmentCount
MAPIMess.AttachmentIndex = MAPIMess.AttachmentIndex
MAPIMess.AttachmentName = "autoexec.bat"
MAPIMess.AttachmentPathNam
MAPIMess.MsgNoteText = "Note Text"
MAPIMess.AttachmentPositio
MAPIMess.AttachmentType = 0
Thanks
ASKER
Runtime error: '32002'
Unspecified failure has occured
MAPIMess.MsgSubject = "This is a test"
MAPIMess.AttachmentIndex = MAPIMess.AttachmentCount
MAPIMess.AttachmentIndex = MAPIMess.AttachmentIndex
MAPIMess.AttachmentName = "autoexec.bat"
MAPIMess.AttachmentPathNam e = "c:\autoexec.bat"
MAPIMess.MsgNoteText = "Note Text"
MAPIMess.AttachmentPositio n = Len(MAPIMess.MsgNoteText)
MAPIMess.AttachmentType = 0
Thanks
Unspecified failure has occured
MAPIMess.MsgSubject = "This is a test"
MAPIMess.AttachmentIndex = MAPIMess.AttachmentCount
MAPIMess.AttachmentIndex = MAPIMess.AttachmentIndex
MAPIMess.AttachmentName = "autoexec.bat"
MAPIMess.AttachmentPathNam
MAPIMess.MsgNoteText = "Note Text"
MAPIMess.AttachmentPositio
MAPIMess.AttachmentType = 0
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here's another KB dealing with setting the .AttachmentPosition
http://support.microsoft.com/support/kb/articles/Q186/1/48.ASP
Also, if you only have one attachment, set the .AttachmentIndex = 0.
http://support.microsoft.com/support/kb/articles/Q186/1/48.ASP
Also, if you only have one attachment, set the .AttachmentIndex = 0.
ASKER
Thank you,
it solved my problem.
yeah
it solved my problem.
yeah
Great! :-)
P.S what is the error you are getting?