Re: MailItem flags



I rebuilt the Windows Search index, and now searching works fine. I also
realized that I was programmatically setting FlagRequest but leaving
FlagIcon=0, and Outlook seems to get confused with that.

So, through trial-and-error, it appears that setting FlagIcon to something
actually sets a colored Category if there is no Category already set. I.e.,
setting FlagIcon=olBlueFlagIcon gives the message a red flag and sets it to
"No Categories (colored by Outlook 2003 Blue flag)".

Is there a different property I should set for 2007? Something that will set
flags like the orange "Tomorrow" or pink "This Week" flag?

--Gary

"Ken Slovak - [MVP - Outlook]" wrote:

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: Search
    ... To use dedicated newreader software, eg outlook express, then you can flag ... the msg & return to it ...
    (microsoft.public.office.misc)
  • Re: Is PR_SEARCH_KEY an acceptable substitute for PR_ENTRYID?
    ... Does OutsideIn handle named properties correctly when saving in the MSG ... If you have a contact or appointment saved, does Outlook display it Ok? ... LPDISPATCH pDispItems = folder.GetItems; ... each of which loads the PST and then calls ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Redemption Question - showaddressbook and saveas
    ... OutlookSpy - Outlook, CDO ... like a charm BUT if the user selects Cancel from the address book ... It would only save an empty email .msg file ... Msg = Session .GetDefaultFolder.Items.Add ...
    (microsoft.public.outlook.program_vba)
  • Some newbie Outlook/VBA questions
    ... write a macro so that before I send a message, the 'Flag for Follow-Up' ... Although Firefox is set as my default browser, hyperlinks in Outlook ... installing Sue Moshers' zaphtml script? ... She lists some ...
    (microsoft.public.outlook)
  • Re: Possible to create rule that uses keywords located in a text f
    ... Sue Mosher, Outlook MVP ... I think I can have the script reference a text file with the words I ... Dim msg As Outlook.MailItem ... Set olNS = Application.GetNamespace ...
    (microsoft.public.outlook.program_vba)