Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine outlook folder numbers
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01455990
Message ID:
01456109
Views:
173
This message has been marked as a message which has helped to the initial question of the thread.
Hi Karen,

in the line
=loMSG.Move(loNameSpace.Folders(1).Folders(14))   
Folders(1) refers to the PST file, Exchange account, etc. The number depends on what mailboxes a user opens any how many PST file they made available. The second folder refers to the folder inside the mailbox. It's easy if you refer to the folder by name, such as:
=loMSG.Move(loNameSpace.Folders("Personal Folders").Folders("Done"))   
However, the name of the first level depends on the name of the mail box. Personal Folder is the name for the English version with a PST file. Localized versions and exchange server connections have a different name. Therefore it might be even easier, to let the user pick the desired folder once:
Local loOutlook, loNamespace, loFolder
loOutlook = CreateObject("outlook.application")
loNamespace = loOutlook.GetNamespace("MAPI")
loFolder = loNamespace.PickFolder()
You can then use the folder's EntryId to locate the folder everywhere.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform