Re: MailItem flags



Check ConversationIndex also. The sequence of messages in a thread uses a base GUID with a time/date stamp appended for each succeeding message. So the index for message #2 is x bytes longer than for message #1 and the first n bytes are identical. I think x is 20 if I recall correctly.

That categories thing relates to changes made to flags and categories in Outlook 2007.

It's very interesting to watch what happens to the MAPI properties on an item when a flag and/or a reminder is set on it using a MAPI viewer such as OutlookSpy.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Gary E." <GaryE@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:610E17B6-8C78-4EE1-9E11-8EDC2B23BCFB@xxxxxxxxxxxxxxxx
Okay, wait, I just noticed something. When I right-click a message and select
Find All Related Messages, it comes back with nothing. So I'm going to see if
I can rebuild my OST and see if that helps.

"Gary E." wrote:

"Ken Slovak - [MVP - Outlook]" wrote:
> Your code works here.
>
> Are you using Outlook 2007 release version or a beta version?

I'm pretty sure it's the released version. Version is 12.0.4518.1014. I'm
running against Exchange. I ran ScanOST.exe, but nothing changed.

I wrote a little macro to display the various flag values, and then ran a
test on a conversation with only two messages (one in Inbox, one in Sent
Items). I set the flag in the first message, then ran the main macro, using
the little display macro to show the values in each message along the way.
Below are the results. The "Header" shown is what's displayed in the header
of the message.

An interesting thing to note is that when I run my macro, the 2nd message
displays a red box in the Categories column. If I change the macro so that it
doesn't set FlagIcon, then this doesn't happen.
----------------------------
Before (clean state):

Msg 1:
FlagStatus: 0
FlagDueBy: 1/1/4501
FlagRequest:
FlagIcon: 0
ReminderSet: False
ReminderTime: 1/1/4501
Header:
<blank>

Msg 2:
FlagStatus: 0
FlagDueBy: 1/1/4501
FlagRequest:
FlagIcon: 0
ReminderSet: False
ReminderTime: 1/1/4501
Header:
<blank>


Manually set flag info on Msg 1:

Msg 1:
FlagStatus: 2
FlagDueBy: 1/16/2007 5:30:00 PM
FlagRequest: Waiting
FlagIcon: 6
ReminderSet: True
ReminderTime: 1/16/2007 5:30:00 PM
Header:
"Waiting. Start by Tuesday, January 16, 2007. Due by Tuesday, January 16,
2007. Reminder: Tuesday, January 16, 2007 5:30 PM."

Msg 2:
FlagStatus: 0
FlagDueBy: 1/1/4501
FlagRequest:
FlagIcon: 0
ReminderSet: False
ReminderTime: 1/1/4501
Header:
"This message is part of a tracked conversation. Click here to find all
related messages or to open the original flagged message."


Select Msg 1 and run macro (to set flags in Msg 2):

Msg 1:
FlagStatus: 2
FlagDueBy: 1/16/2007 5:30:00 PM
FlagRequest: Waiting
FlagIcon: 6
ReminderSet: True
ReminderTime: 1/16/2007 5:30:00 PM
Header:
"Waiting. Start by Tuesday, January 16, 2007. Due by Tuesday, January 16,
2007. Reminder: Tuesday, January 16, 2007 5:30 PM."

Msg 2:
FlagStatus: 2
FlagDueBy: 1/16/2007 5:30:00 PM
FlagRequest: Waiting
FlagIcon: 6
ReminderSet: True
ReminderTime: 1/16/2007 5:30:00 PM
Header:
"Waiting by Tuesday, January 16, 2007 5:30 PM."
"No Categories (colored by Outlook 2003 Red flag)"
----------------------------

If I don't set FlagIcon in the macro, then in the last step the Header of
Msg 2 reads:
"Waiting by Tuesday, January 16, 2007 5:30 PM."
"This message is part of a tracked conversation. Click here to find all
related messages or to open the original flagged message."

.



Relevant Pages

  • Re: running a macro past a condition
    ... in Condition column "within that block" being the last action inside the If ... Message: "First Msg" ... to check if a table's recordset is null, in which case there are no errors ... it is okay to have more than one condition within the same macro. ...
    (microsoft.public.access.macros)
  • Re: Removing Macro from a shape as it is pasted
    ... Dim sName As String ... Dim msg As String ... msg = msg + vbNewLine + vbNewLine ... I have a macro which is used in a sheet used to draw diagrams. ...
    (microsoft.public.excel.programming)
  • Re: remove msg box prompt
    ... The msg prompt still comes up as before. ... Don't forget to set it back to TRUE at the end of your macro. ... box that prompted me that there is a large amt of data from clipboard ...
    (microsoft.public.excel.programming)
  • Re: MailItem flags
    ... I set the flag in the first message, then ran the main macro, using ... The "Header" shown is what's displayed in the header ... Msg 1: ...
    (microsoft.public.outlook.program_vba)
  • Re: MailItem flags
    ... Show the code in your macro. ... The possible values for FlagIcon are in the OlFlagIcon enumeration. ... a way for all messages in a conversation to have the same flag setting - you ...
    (microsoft.public.outlook.program_vba)