Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using MAPI to retrieve attachment
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00190852
Message ID:
00190949
Views:
12
>>I seem to remember that files can either be embedded (as OLE objects) or 'attached' to the message. Check the attachment 'type' just in case.
>
>Thanks for the suggestion. I cannot get a hold of the .AttachmentType either. I have been trying with Outlook Express as well now with the same result:
>
>I can see there is an attachment, but I cannot retrieve any info regarding the attachment. I looks as though I am missing something here.
>
>This is the code I am using :
>
>

>&& Go to a mail with attachment
>THISFORM.MAPImessage.MsgIndex = 2
>
>IF THISFORM.MAPImessage.AttachmentCount > 0
> && Just in case...
> THISFORM.MAPImessage.AttachmentIndex = 0
>
> && I get an error on this line as .AttachmentPathName holds no value
> lcPath = THISFORM.MAPImessage.AttachmentPathName
>
>ENDIF


OK, I remember running into all sorts of problems when I first started using MAPI...unfortunately, although I found the cure, I can't remember them now!.

Make sure that you've got a valid MAPI installation : sometimes it's possible to have a sort of 16/32 bit hybrid: make sure your MAPI installation states "Windows Messaging" when it starts up, not Exchange (I have messaging build 4.0.839.14).

When I installed LookOut Express I stated that I wanted to have it act as my MAPI client, which promptly disabled MAPI - check this.
Previous
Reply
Map
View

Click here to load this message in the networking platform