Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving emails INTO inbox in outllook.
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Moving emails INTO inbox in outllook.
Divers
Thread ID:
01461019
Message ID:
01461019
Vues:
145
the code below moves emails from inbox to a folder called inboxtemp.
After all emails have been transferred to inboxtemp, i would like to move them all back to inbox. They are in 'unread' state in inboxtemp.
Is there a simple way to do this?

(The why of it is, (if you're interested) new emails are processed and moved to a folder called 'processed' those that do not relate to this task are moved to 'inboxtemp'. so stage one is complete now i need stage 2 - move 'em all back.)

many thanks
k
Local loOutlook   As Outlook.Application
Local loNameSpace As Outlook.NameSpace
Local loInBox     As Object
Local loMSG      As Outlook.MailItem
Local lnUnRead    As Integer
Local loAttach,llAttach

#Define olFolderInBox      6


loOutlook   = Createobject('Outlook.Application') &&
loNameSpace = loOutlook.GetNamespace("MAPI")
loInBox     = loNameSpace.GetDefaultFolder(olFolderInBox)
lnUnRead    = 0

For Each loMSG In loInBox.Items
If loMSG.UnRead
		loAttach = loMSG.attachments   && attachments object
		llAttach = Iif(loAttach.Count > 0,.T.,.F.)   && number of attachments
		
		lnUnRead = lnUnRead + 1

		tem= loMSG.SenderName
		temO=loMSG.SenderName
		son = mdy(loMSG.SentOn)
		sub = loMSG.Subject

=loMSG.Move(loNameSpace.Folders("Personal Folders").Folders("inboxtemp")) 


Endif

Endfor
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform