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