S
Steve Roberts
In the code below I would like to move to the next folder in the collection
if any of the IF...THEN items are true. I keep seeing ways to exit the loop
but not to increment and skip part of the loop.
Any suggestions would be appreciated
Steve
For Each olNewFolder In CurrentFolder.Folders
Debug.Print olNewFolder.Items.Count
If olNewFolder.Name = "Deleted Items" Then ' go to the
Next folder
If olNewFolder.Items.Count <= 1 Then ' go to the Next
folder
If olNewFolder.DefaultItemType = olContactItem Then ' go to
the Next folder
If olNewFolder.DefaultItemType = olAppointmentItem Then ' go
to the Next folder
MyNameSpace.AddStore "c:\" & olNewFolder.Name & ".pst"
Set objFolder = MyNameSpace.Folders.GetLast '.GetLast Set
objFolder to last folder
objFolder.Name = olNewFolder.Name ' change the name that the user
sees in outlook
ProcessFolder olNewFolder 'Call Process Folder to actually perform the
move
End If
Next
if any of the IF...THEN items are true. I keep seeing ways to exit the loop
but not to increment and skip part of the loop.
Any suggestions would be appreciated
Steve
For Each olNewFolder In CurrentFolder.Folders
Debug.Print olNewFolder.Items.Count
If olNewFolder.Name = "Deleted Items" Then ' go to the
Next folder
If olNewFolder.Items.Count <= 1 Then ' go to the Next
folder
If olNewFolder.DefaultItemType = olContactItem Then ' go to
the Next folder
If olNewFolder.DefaultItemType = olAppointmentItem Then ' go
to the Next folder
MyNameSpace.AddStore "c:\" & olNewFolder.Name & ".pst"
Set objFolder = MyNameSpace.Folders.GetLast '.GetLast Set
objFolder to last folder
objFolder.Name = olNewFolder.Name ' change the name that the user
sees in outlook
ProcessFolder olNewFolder 'Call Process Folder to actually perform the
move
End If
Next