Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00477734
Message ID:
00477851
Vues:
17
On a more helpful note, I got this to work on my Win2000 machine running Outlook 2000:
DO WHILE myRestrictedItems.count > 0
  myRestrictedItem = myRestrictedItems.Item(1)
  loReply = myRestrictedItem.Reply
  lcSender = loReply.Recipients[1].Address
  ? lcSender
  myRestrictedItem.move(oNewFolder)
ENDDO
-Lou.


>>Hi,
>>
>>I have the following code to move all the emails sent to information@abc.com to the oNewFolder folder
>>
>>When I run the following code each time, only about half of the total mails sent to this address are moved to the destinated folder, not all.
>>Can any one solve this problem for me. Thanks.
>>
>>******************************************************************
>>
>>myRestrictedItems = myItems.restrict("[To] = information@abc.com")
>>
>>for each myRestrictedItem in myRestrictedItems
>> loReply = myRestrictedItem.Reply
>> lcSender = loReply.Recipients[1].Address
>> ?lcSender
>>
>> myRestrictedItem.move(oNewFolder)
>>endfor
>>
>>*******************************************************************
>>
>>Mun
>
>(disclaimer on) I have not worked with Outlook objects, but I have worked with MS Word application objects. (disclaimer off)
>
>Perhaps the difficulty lies in the For loop iterating through the collection while the number of items changes because of the move command. Try commenting out the move command line to see if the loop without the move can iterate through the whole collection. If so, then you at least have a better understanding of the problem.
>
>-Lou.
"All my life I said I wanted to be someone ...
I can see now that I should have been more specific." -Jane Wagner
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform