Created
November 14, 2023 14:05
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Subroutine zum Durchgehen der Elemente in einem bestimmten Ordner | |
Public Sub GetItemsOfFolder(MAPIFolder As Outlook.MAPIFolder) | |
Dim myEmail As Outlook.MailItem | |
Dim myObj As Object | |
Debug.Print "Der Ordner " & MAPIFolder.FolderPath & " enthält " & MAPIFolder.Items.Count & " Elemente" | |
' Durchgeht jedes Element im Ordner | |
For Each myObj In MAPIFolder.Items | |
' Prüft, ob es sich um eine E-Mail handelt | |
If TypeName(myObj) = "MailItem" Then | |
Set myEmail = myObj | |
Debug.Print " " & myEmail.Subject | |
End If | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment