to send attachments you can use the following syntax:
with loMAPIMessage
.AttachmentIndex = .AttachmentCount
.AttachmentName = right(cFileName, len(cFileName) - rat('\', cFileName))
.AttachmentPathName = cFileName
endwith
being cFileName the name of the file to attach with the full path, and loMAPIMessage the MS MAPI Message object.
Hope it helps,
Javier.
>I'm tring to send an attachment using MAPI but the attachment ends up embedded in the main body (at the end).
>
>I'm following the notes in MegaFox (page 91) by setting the AttachmentPosition ato the end of the main body -->
>
>oMapi.MsgNoteText = cText + CHR(13) + CHR(13) + SPACE(5)
>oMapi.AttachmentPosition = LENC(cText) + 3
>
>I'm not getting any errors. Any ideas?
>
>John