Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move emails between folders
Message
From
10/03/2010 01:43:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Move emails between folders
Miscellaneous
Thread ID:
01453666
Message ID:
01453666
Views:
109
Does anyone have any idea why this does not work

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 

#DEFINE olFolderInBox      6
#DEFINE olFolderDone      3

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

oloMSG = olNameSpace.GetDefaultFolder(olFolderInBox).Items
FOR EACH loMSG IN loInBox.Items
  
IF loMSG.UnRead 
wait window loMSG.Subject            
loMSG.Move(loNameSpace.Folders(6).Folders(3))    
Endif
Next
Next
Reply
Map
View

Click here to load this message in the networking platform