![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... 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 |
#3
|
|||
|
|||
![]()
Thanks Sue - It was the restart Outlook step I was missing!!
|
#4
|
|||
|
|||
![]()
Am alternative approach I found was to Self Sign the script for use on
my computer - allowing me to keep my security settings. See http://www.microsoft.com/technet/pro.../vbamacro.mspx for full details. The basic approach is to use C:\Program Files\Microsoft Office\OFFICE11\selfcert.exe to create the digital signature and then select this inside Outlook. Hope this is of use to people. Scott |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Selective Read Receipts VBA using run a script rule | prideoflions | Outlook and VBA | 5 | May 26th 06 04:31 PM |
Script error while running .Net Code | Muhammad Usman | Outlook - Using Forms | 1 | May 4th 06 01:17 PM |
"Run a script" rule triggers but script does not execute | Trey Shaffer | Outlook and VBA | 7 | April 8th 06 12:34 AM |
Problem running a VBA script from an Outlook rule | Olivier Langlois | Outlook and VBA | 5 | March 16th 06 10:03 PM |
Problem running a VBA script from an Outlook rule | Olivier Langlois | Add-ins for Outlook | 5 | March 16th 06 10:03 PM |