![]() |
#6
|
|||
|
|||
![]()
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 |
|
![]() |
||||
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 |