Re: Setting Folder Aging Properties Prob
Hi Lando,
for the first you can easily adapt this template:
' <Sample: Loop through the Outlook folders hierarchy for handling _
each folder item>
Public Sub HandleAllItems(oRoot As Outlook.NameSpace)
LoopFolders oRoot.Folders, True
End Sub
Private Sub LoopFolders(oFolders As Outlook.Folders, _
ByVal bRecursive As Boolean _
)
Dim oFld As Outlook.MAPIFolder
' Loop through all folders.
For Each oFld In oFolders
' Loop through folder items
LoopItems oFld.Items
If bRecursive Then
' Call this function again for going _
deeper into the object hierarchy.
LoopFolders oFld.Folders, bRecursive
End If
Next
End Sub
Private Sub LoopItems(oItems As Outlook.Items)
Dim obj As Object
For Each obj In oItems
Select Case True
Case TypeOf obj Is Outlook.MailItem
HandleMailItem obj
Case TypeOf obj Is Outlook.ContactItem
' Another method for handling ContactItems
' etc.
End Select
Next
End Sub
Private Sub HandleMailItem(oItem As Outlook.MailItem)
' Do s.th. with the object.
End Sub
' </Sample>
For the second please wait for Ken :-)
--
Viele Grüße
Michael Bauer
|