开发者

UserForm in script run from Outlook Rule

开发者 https://www.devze.com 2022-12-31 09:17 出处:网络
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:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消