Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email receive
Message
De
01/01/2008 12:21:01
 
 
À
01/01/2008 08:43:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01278474
Message ID:
01278814
Vues:
18
* Count messages in Inbox
Contagem = inbox.Items.Count


The inbox can contain either e-mail messages or other folders.

So I would usew code like this to process the items in the Inbox:
*** Get a local referenece to the collection of of items in the Inbox
loItems = loInbox.Items

*** Process all the items in the inbox
*** If it is a mail item, save it and process the attachments
IF VARTYPE( loItems ) = 'O'
  FOR EACH loItem IN loItems
    IF loItem.Class = 43 && olMail	
      *** Process the message and the attachments
    ENDIF
  ENDFOR
ENDIF
* Move the complete message to deleted items
* remember that object 'eliminados' is an instance to
* 'deleted items' folder
mensagem.Move(eliminados)


This has the effect of making the count of the items collection less than your loop limit ( contagem ). I would expect an Error 1234: Subscript is outside defined range.
loRootFolder = oNameSpace.GetDefaultFolder( 6 ) && Inbox
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform