Basically I need this to be recursive... so
Start a folder "A" that is passed in...
and loop through all Mailitems.. then do the same for each subfolder
this will get 1st level of subfolders..
VB Code:
Private Sub PrintSubjects(oFLD As Outlook.MAPIFolder) For z = 1 To oFLD.Folders.Count Set ssFld = oFLD.Folders(z) For x = 1 To ssFld.Items.Count If TypeOf ssFld.Items(x) Is MailItem Then Set oMail = ssFld.Items(x) Debug.Print ssFld.Name & ": " & oMail.Subject End If Next Next End Sub
thanks!


Reply With Quote