Filter to Mark Completed

A

AzDayton

(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
 
E

Eric Legault [MVP - Outlook]

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
 
A

AzDayton

Thanks Eric. I had no idea it was a task, since I never use Tasks in
Outlook. When I was playing with it, I tried adding:

debug.print item.subject

to make sure it was trying to "complete" the right "email", and that seemed
to work fine, so I simply assumed I was working with email here. It still
makes no sense to me that this won't work, but I'll take your word for it and
move on with my life.

Thanks again.

- Dayton - Thu. 08/14/2008 @ 14:08:29



Eric Legault said:
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 said:
(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
 

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