ERFORDERLICHE
OBJEKTE
1 CommandButton (Command1)
FORM-CODE
Dim objOutlook As Outlook.Application
Dim objMapi As Outlook.NameSpace
Dim Anzahl As IntegerePrivate Sub Command1_Click()
Set objOutlook = New Outlook.Application
Set objMapi = objOutlook.GetNamespace("MAPI")
For i = 1 To objMapi.GetDefaultFolder(olFolderInbox).UnReadItemCount
Anzahl = Anzahl + 1
Next i
MsgBox Anzahl & " ungelesene Nachricht(en) !", vbInformation, _
"Outlook Postfach"
Set objMapi = Nothing
vSet objOutlook = Nothing
End Sub
|