View Single Post
  #2  
Old August 13th 08, 07:28 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Filter to Mark Completed

You're talking about Task Request confirmations, correct? The options for
running a script with the Rules Wizard is limited to MailItem and
MeetingItem objects.

Your other option is to trap the Item_Add event for the Inbox. See:

How to create a custom rule in Outlook 2000 by using Visual Basic for
Applications:
http://support.microsoft.com/Default.aspx?kbid=235852

Also, although task completed notifications are regular e-mails, Task Update
and Task Accepted messages are IPM.Task.Update and IPM.Task.Accepted class
types, so you'd need to use a TaskItem object to work with them.

--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
President
Collaborative Innovations
- Try Picture Attachments Wizard 2.0 For Microsoft Outlook -
- Take your SharePoint content offline -
- More info: http://www.collaborativeinnovations.ca -
Blog: http://blogs.officezealot.com/legault


"AzDayton" wrote in message
...
(Outlook 2003)

Hi. I'm trying to filter incoming mails which are notifications only, and
are completed before I ever see them. I'd like to move them to a folder,
flag them, then have them marked completed, all without my having to see
it
happen.

I can do most of this using the Rules and Alerts. However, there is no
"Mark Completed" option. So I tried the "Run a Script" option.

Here's the "script" that I THOUGHT should work, but doesn't:
=======================================
Sub FlagComplete(Item As Outlook.MailItem)
Item.FlagStatus = olFlagComplete
Item.Save
End Sub
=======================================

Any ideas on what I'm doing wrong? I'm pretty new to VBA, but it seemed
pretty straightforward. The script DOES run, it just doesn't seem to do
what
I want it to. I've got it attached to the ThisOutlookSession object.

Thanks in advance!

- Dayton - Tue. 08/12/2008 @ 13:06:38


Ads