Outlook中自定义新邮件提醒
由于我平时工作的时候总是在远程桌面或者虚机里边,所以经常有新邮件或者Reminder没有能及时察觉,所以便写了这么一个VBA,在有新邮件或者reminder的时候使用主板小喇叭来点动静。关于Outlook的编程可以参考这篇文章
Option Explicit Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long Const ONE_BEEP = 600 Const HALF_BEEP = 300 Const NOTE_1 = 440 Const NOTE_2 = 495 Const NOTE_3 = 550 Const NOTE_4 = 587 Const NOTE_5 = 660 Const NOTE_6 = 733 Const NOTE_7 = 825 Private Sub Application_NewMail() Beep NOTE_5, ONE_BEEP Beep NOTE_3, HALF_BEEP Beep NOTE_5, HALF_BEEP Beep NOTE_1 * 2, ONE_BEEP * 2 End Sub Private Sub Application_Reminder(ByVal Item As Object) Beep NOTE_3, ONE_BEEP Beep NOTE_3, HALF_BEEP Beep NOTE_2, HALF_BEEP Beep NOTE_3, ONE_BEEP * 2 End Sub