Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move emails between folders
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01453666
Message ID:
01453788
Views:
87
This message has been marked as the solution to the initial question of the thread.
>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
>
It depends where it "does not work". ANy errors ? If yes, on what line?

Anyway, methods should be called like:
 =loMSG.Move(loNameSpace.Folders(6).Folders(3))    
Good Luck
Previous
Reply
Map
View

Click here to load this message in the networking platform