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

Filter to Mark Completed



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 12th 08, 10:08 PM posted to microsoft.public.outlook.program_vba
AzDayton
external usenet poster
 
Posts: 3
Default Filter to Mark Completed

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


  #3  
Old August 14th 08, 11:10 PM posted to microsoft.public.outlook.program_vba
AzDayton
external usenet poster
 
Posts: 3
Default Filter to Mark Completed

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 [MVP - Outlook]" wrote:

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


 




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
A way to mark off completed appts/tasks without deleting them. Adrienne Outlook - Calandaring 3 September 24th 08 11:17 PM
Any way to show completed calendar appointments as completed? Sinbad7 Outlook - Calandaring 5 May 18th 08 12:50 AM
Can I mark an appointment as completed in Outlook 2007? edieb13 Outlook - Calandaring 3 May 9th 07 03:37 AM
display completed tasks in the calendar day they were completed JJRamCHS Outlook - Calandaring 2 August 5th 06 02:44 AM
How do I mark an appointment as completed? Paint Horse Gal Outlook - Calandaring 1 February 26th 06 10:41 AM


All times are GMT +1. The time now is 04:32 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.