Advertisement
1_2002 OLE/ COM/ DCOM/ Active-X #104472

Check your Outlook Inbox for new messages . . .

Checks you Microsoft Outlook Inbox for new Mail Items.

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
Dim objOutlook As Outlook.Application
Dim objMapiName As Outlook.NameSpace
Dim intCountUnRead As Integer
Private Sub Check_Mail_Click()
 Set objOutlook = New Outlook.Application
 Set objMapiName = objOutlook.GetNamespace("MAPI")
 
 For I = 1 To objMapiName.GetDefaultFolder(olFolderInbox).UnReadItemCount
 
  intCountUnRead = intCountUnRead + 1
 
 Next
 
  MsgBox "You have " & intCountUnRead & " new messages in your Inbox . . 
  ",   vbInformation + vbOKOnly, "New Messages . . ."
  intCountUnRead = 0
 Set objMapiName = Nothing
 Set objOutlook = Nothing
 
End Sub
Původní komentáře (3)
Obnoveno z Wayback Machine