VBA Outlook Mails auslesen
Hallo Gemeinschaft,
vwerwende folgendes script für da Verarbeiten von Emails, die in einen bestimmten Ordner gelangen - gibt es eine Möglichkeit, dass ich zwei Ordner überwache?
vwerwende folgendes script für da Verarbeiten von Emails, die in einen bestimmten Ordner gelangen - gibt es eine Möglichkeit, dass ich zwei Ordner überwache?
Sub Application_NewMailEx(ByVal EntryIDCollection As String)
'On Error Resume Next
Dim myFolder As Outlook.MAPIFolder
Dim myNameSpace As Outlook.NameSpace
Dim OLApp As New Outlook.Application
Dim msg As Outlook.MailItem
Set myNameSpace = Application.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox).Folders("Booking")
Set Application.ActiveExplorer.CurrentFolder = myFolder
Application.GetNamespace("MAPI").GetDefaultFolder (olFolderInbox)
For Each msg In myFolder.Items
If msg.UnRead Then
.....
Please also mark the comments that contributed to the solution of the article
Content-Key: 7889449487
Url: https://administrator.de/contentid/7889449487
Printed on: May 1, 2024 at 23:05 o'clock
2 Comments
Latest comment
Dein Fragenkontingent ist für diese Woche schon aufgebraucht, komm Freitag wieder.
Outlook newMailex oder NewMail?
Zeppel.
Application_NewMailEx(ByVal EntryIDCollection As String)
Das erfasst eh schon alles was rein kommt ... RTFMOutlook newMailex oder NewMail?
Zeppel.