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:
01456230
Views:
64
thanks Mike - good stuff.

k

>>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
Reply
Map
View

Click here to load this message in the networking platform