MAPI controls - mail message attachments 
Author Message
 MAPI controls - mail message attachments


I've got an app that scans a mailbox looking for returned (undeliverable)
messages from a mailshot we sent out. Each message in the mailshot had a
unique ID in the message text, and the app goes looking for those ID's so
it can record who won't have received a message.

The trouble is that some mail systems return the original message as an
attachment (appears as an envelope icon in Outlook). I've tried using code
to access the attachments and process the text as it would process a
message body. This is the code that should theoretically give me the text
from the attached message and put it in the debug window:

If MAPIMessages1.AttachmentCount = 1 Then

        AttachmentPath = MAPIMessages1.AttachmentPathName

        Open AttachmentPath For Input As #1
        AttachmentContent = ""
        Do While Not EOF(1)
               AttachmentContent = AttachmentContent & Input(1, #1)
        Close #1

        Debug.Print AttachmentContent

End If                

BUT all I get in the debug window is this....

D? ?

What's going on??!!



Tue, 11 Dec 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. MAPI Message control loses attachments details for Internet E-mail

2. Downloading attachment from MAPI mail message

3. Sending e-mail without attachment using MAPI controls

4. Mapi Messages control + Outlook Express = no attachments!

5. Help! MAPI Message Control - Save Attachments

6. Reading Attachments in MAPI Message control

7. Sending HTML Mail Messages using MAPI Controls

8. Saving Mail Attachments with MAPI

9. How to save MS-Mail Attachment (mapi)

10. Extract attachment from mail with MAPI

11. Extract attachment from mail with MAPI

12. View Attachment with MAPI message in Win98 ????


Powered by phpBB® Forum Software