Information générale
Catégorie:
Contrôles ActiveX en VFP
Titre:
Read Attachments from Outlook Express Mail
Hi everybody,
I use the MSMAPI activeX to read attachments from Inbox messages:
object.AttachmentCount
(Returns the number of attachments in the message)
then I set the following property:
object.AttachmentIndex
(Sets the currently indexed attachment - its value can range from zero to object.AttachmentCount)
then I read the attachment file from:
object.AttachmentName
The problem is that when the Mapi Client is Outlook Express (or Netscape) the property object.AttachmentCount allways returns zero, although I can still set the object.AttachmentIndex property to the existing attachments and read the respective files.
The only way to find how many attachments the message contains is by trying to set the AttachmentIndex property and catch the error (that fires when that index is beyond the number of attachments in the message).
Does anybody know of a cleaner way to do this ?
I don't want to code my ONERROR routine to catch an error based on its message text.
TIA
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement