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:
01456026
Views:
101
This message has been marked as the solution to the initial question of the thread.
>The code below moves unread emails from the inbox to a folder called 'Done'. It works on my computer but it's a little difficult to figure out the folder names-numbers on other computers - it's guess work. On one i worked on inbox is folder is 4 - on mine it's folder 1.
>Is there a couple of line of code i can introduce to show what folder names correspond to what folder numbers - there sems to be no logical ordering of numbers.
>
>thanks k
>
clear 
loOutlook   = Createobject('Outlook.Application') &&
loNameSpace = loOutlook.GetNamespace("MAPI")
lnCount = loNameSpace.Folders.Count
for i = 1 to lnCount
  ?"Main Folder: "+loNameSpace.Folders(i).name
  lnCountSub=loNameSpace.Folders(i).Folders.Count
  for j = 1 to lnCountSub
     ?"   Sub Folder:  "+loNameSpace.Folders(i).Folders(j).Name 
  endfor
endfor
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform