A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Rule 'run a script' not running my script



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old May 25th 06, 12:38 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 1
Default Rule 'run a script' not running my script

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selective Read Receipts VBA using run a script rule prideoflions Outlook and VBA 5 May 26th 06 03:31 PM
Script error while running .Net Code Muhammad Usman Outlook - Using Forms 1 May 4th 06 12:17 PM
"Run a script" rule triggers but script does not execute Trey Shaffer Outlook and VBA 7 April 7th 06 11:34 PM
Problem running a VBA script from an Outlook rule Olivier Langlois Outlook and VBA 5 March 16th 06 09:03 PM
Problem running a VBA script from an Outlook rule Olivier Langlois Add-ins for Outlook 5 March 16th 06 09:03 PM


All times are GMT +1. The time now is 07:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.