Rule 'run a script' not running my script

S

s.parsley

I'm trying to use the VBA script below to create a TaskItem from an
email when a particular one of my rules gets triggered. However, it
appears as if the script is never run. Any thoughts? I've tried
tweaking various security settings but this hasn't appeared to help.

Public Sub CreateTaskForEmail(eMail As MailItem)
Dim Task As Outlook.TaskItem
Set Task = ThisOutlookSession.CreateItem(olTaskItem)

'Create a task that will remind me to look at it tomorrow
With Task
.Subject = eMail.Subject
.Body = eMail.Body
.DueDate = DateTime.DateAdd("d", 1, Now)
.ReminderSet = True
.ReminderTime = "10:00"
.Save
End With
End Sub
 
S

Sue Mosher [MVP-Outlook]

After you change the macro security settings, you must restart Outlook. Did you do that?

What about a simple procedure with just a MsgBox statement? Does that run?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top