UserForm in script run from Outlook Rule
Based on http://support.microsoft.com/kb/306108 I'd like to create a custom rule that shows a custom UserForm instead of the pl开发者_StackOverflowain old MsgBox. What I wrote was this:
Dim alerts As CustomAlerts
Sub CustomMailMessageRule(Item As Outlook.MailItem)
alerts.Messages.AddItem Item.Subject
alerts.Show
End Sub
CustomAlerts is a UserForm containing a single ListBox.
Sadly my attempt does not work -- no window appears. What am I doing wrong?
You need to create an instance of your UserForm
Set alerts = new CustomAlerts
Marcus
精彩评论