Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 02-28-2005, 08:47 PM
Michael Bauer
Guest
 
Posts: n/a
Default 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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up a program to run from your calendar mattz76 Outlook 0 08-22-2007 09:13 PM
Can I get some help setting this up please? Moiraes Fate Office 0 05-18-2007 12:22 PM
Looping though Custom Properties in VBA suekay Misc 0 05-19-2006 06:10 AM
Visio - Custom Properties Timeout? googull Visio 0 05-17-2006 07:37 AM
setting rules isapaine Misc 0 01-11-2006 07:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft