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

MailItem flags



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 21st 06, 10:26 PM posted to microsoft.public.outlook.program_vba
Gary E.
external usenet poster
 
Posts: 5
Default MailItem flags

I've got a macro that worked in Outlook 2003 but acts funny in 2007. I wanted
a way for all messages in a conversation to have the same flag setting - you
select a message that has a flag, and the macro sets all the messages in the
same conversation to the same flag settings. This worked fine in 2003.

In the macro, after I've found all the messages in the conversation, I copy
the following settings from the selected message to each message in the
conversation:

FlagStatus
FlagDueBy
FlagRequest
FlagIcon
ReminderSet
ReminderTime

An example of the "funny" behavior: I have two messages in a conversation. I
set one message with the flag text = "Waiting", the start date to 12/21/06
and the due date to 12/22/06. But when I look at the message in VBA, I don't
find what I expect in the Flag properties. For instance, I expect FlagDueBy
to be 12/22/06, but instead it's null (1/1/4501).

Then, when I run the macro to copy the flag info to the other message in the
conversation, the other message gets the custom "Waiting" text for the flag,
but no Start and Due dates; and the message displayed in the Inbox has a big
red square where it normally displays the Category color, but no Category is
set on the message (I stepped through the macro and discovered that this
occurs when I copy the FlagIcon value from one message to another; the color
of the square changes with the value of FlagIcon, but the icon doesn't
change).

The 2007 VBA Help says that one of the differences between 2003 and 2007 is
that the FlagDueBy, FlagIcon, and FlagStatus properties are "Hidden", but it
doesn't explain what that means. I get no error in Visual Basic when I access
those properties.

I also can't find in Help what property contains the Start By date, nor an
explanation of FlagIcon values.

So how do I, in VBA, get one message to have exactly the same flag
information as another message?

--Gary
Ads
  #2  
Old December 22nd 06, 03:43 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default MailItem flags

Show the code in your macro.

"Hidden" in this context means that the properties will only show up in the
Object Browser if you right-click in the Object Browser's right hand pane
and select "Show Hidden Members". The intention is to hide the properties
for possible future deprecation but still allow existing code to run without
errors.

The possible values for FlagIcon are in the OlFlagIcon enumeration.

What do you mean by Start By date?

I haven't seen any problems setting any of those properties in either
Outlook 2003 or 2007 in my reminder applications.

--
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." wrote in message
...
I've got a macro that worked in Outlook 2003 but acts funny in 2007. I
wanted
a way for all messages in a conversation to have the same flag setting -
you
select a message that has a flag, and the macro sets all the messages in
the
same conversation to the same flag settings. This worked fine in 2003.

In the macro, after I've found all the messages in the conversation, I
copy
the following settings from the selected message to each message in the
conversation:

FlagStatus
FlagDueBy
FlagRequest
FlagIcon
ReminderSet
ReminderTime

An example of the "funny" behavior: I have two messages in a conversation.
I
set one message with the flag text = "Waiting", the start date to 12/21/06
and the due date to 12/22/06. But when I look at the message in VBA, I
don't
find what I expect in the Flag properties. For instance, I expect
FlagDueBy
to be 12/22/06, but instead it's null (1/1/4501).

Then, when I run the macro to copy the flag info to the other message in
the
conversation, the other message gets the custom "Waiting" text for the
flag,
but no Start and Due dates; and the message displayed in the Inbox has a
big
red square where it normally displays the Category color, but no Category
is
set on the message (I stepped through the macro and discovered that this
occurs when I copy the FlagIcon value from one message to another; the
color
of the square changes with the value of FlagIcon, but the icon doesn't
change).

The 2007 VBA Help says that one of the differences between 2003 and 2007
is
that the FlagDueBy, FlagIcon, and FlagStatus properties are "Hidden", but
it
doesn't explain what that means. I get no error in Visual Basic when I
access
those properties.

I also can't find in Help what property contains the Start By date, nor an
explanation of FlagIcon values.

So how do I, in VBA, get one message to have exactly the same flag
information as another message?

--Gary


  #3  
Old January 15th 07, 10:38 PM posted to microsoft.public.outlook.program_vba
Gary E.
external usenet poster
 
Posts: 5
Default MailItem flags

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

Show the code in your macro.


It's a little long, but here goes (the DupQuotes function doubles any quote
marks it finds in the given string):

Sub SetConversationFlags()

' If the currently selected message has a flag set,
' then this macro finds all the messages within the same conversation
' and gives them the same flag values.

Dim myOlApp As New Outlook.Application
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim sconv As String
Dim sexpiry As String

Set myOlExp = myOlApp.ActiveExplorer
Set myOlSel = myOlExp.Selection
If myOlSel.Count 1 Then
MsgBox "Please select only one message."
Exit Sub
End If

'See if the flag is set
If myOlSel.Item(1).FlagRequest = "" Then

MsgBox "No flag set."

Else

'Loop through this conversation
sconv = myOlSel.Item(1).ConversationTopic

'Open the Inbox and SentMail folders for searching
Set inbox =
Application.GetNamespace("MAPI").GetDefaultFolder( olFolderInbox)
Set sentmail =
Application.GetNamespace("MAPI").GetDefaultFolder( olFolderSentMail)

'Now search the Inbox for all other messages with this same
conversation topic
'(double any single quotes in the string first)
sconv = DupQuotes(sconv)
s$ = "[ConversationTopic] = '" & sconv & "'"
Set myitems = inbox.Items.Restrict(s$)
numitems = myitems.Count

'Set all of the messages in this conversation to the same flag values
For j = 1 To numitems
Set mail = myitems(j)
mail.FlagStatus = myOlSel.Item(1).FlagStatus
mail.FlagDueBy = myOlSel.Item(1).FlagDueBy
mail.FlagRequest = myOlSel.Item(1).FlagRequest
mail.FlagIcon = myOlSel.Item(1).FlagIcon
mail.ReminderSet = myOlSel.Item(1).ReminderSet
mail.ReminderTime = myOlSel.Item(1).ReminderTime
mail.Save
Next j

'now search for the same conversation in the SentMail folder and set
flags there
Set myitems = sentmail.Items.Restrict(s$)
numitems = myitems.Count

'Set all of the messages in this conversation to the same flag values
For j = 1 To numitems
Set mail = myitems(j)
mail.FlagStatus = myOlSel.Item(1).FlagStatus
mail.FlagDueBy = myOlSel.Item(1).FlagDueBy
mail.FlagRequest = myOlSel.Item(1).FlagRequest
mail.FlagIcon = myOlSel.Item(1).FlagIcon
mail.ReminderSet = myOlSel.Item(1).ReminderSet
mail.ReminderTime = myOlSel.Item(1).ReminderTime
mail.Save
Next j

End If


End Sub
  #4  
Old January 15th 07, 11:39 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default MailItem flags

Your code works here.

I just commented out the DupQuotes line since I didn't want to bother
writing that procedure. It copies the properties correctly.

Are you using Outlook 2007 release version or a beta version?

--
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." wrote in message
...
"Ken Slovak - [MVP - Outlook]" wrote:

Show the code in your macro.


It's a little long, but here goes (the DupQuotes function doubles any
quote
marks it finds in the given string):

Sub SetConversationFlags()

' If the currently selected message has a flag set,
' then this macro finds all the messages within the same conversation
' and gives them the same flag values.

Dim myOlApp As New Outlook.Application
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Dim sconv As String
Dim sexpiry As String

Set myOlExp = myOlApp.ActiveExplorer
Set myOlSel = myOlExp.Selection
If myOlSel.Count 1 Then
MsgBox "Please select only one message."
Exit Sub
End If

'See if the flag is set
If myOlSel.Item(1).FlagRequest = "" Then

MsgBox "No flag set."

Else

'Loop through this conversation
sconv = myOlSel.Item(1).ConversationTopic

'Open the Inbox and SentMail folders for searching
Set inbox =
Application.GetNamespace("MAPI").GetDefaultFolder( olFolderInbox)
Set sentmail =
Application.GetNamespace("MAPI").GetDefaultFolder( olFolderSentMail)

'Now search the Inbox for all other messages with this same
conversation topic
'(double any single quotes in the string first)
sconv = DupQuotes(sconv)
s$ = "[ConversationTopic] = '" & sconv & "'"
Set myitems = inbox.Items.Restrict(s$)
numitems = myitems.Count

'Set all of the messages in this conversation to the same flag
values
For j = 1 To numitems
Set mail = myitems(j)
mail.FlagStatus = myOlSel.Item(1).FlagStatus
mail.FlagDueBy = myOlSel.Item(1).FlagDueBy
mail.FlagRequest = myOlSel.Item(1).FlagRequest
mail.FlagIcon = myOlSel.Item(1).FlagIcon
mail.ReminderSet = myOlSel.Item(1).ReminderSet
mail.ReminderTime = myOlSel.Item(1).ReminderTime
mail.Save
Next j

'now search for the same conversation in the SentMail folder and
set
flags there
Set myitems = sentmail.Items.Restrict(s$)
numitems = myitems.Count

'Set all of the messages in this conversation to the same flag
values
For j = 1 To numitems
Set mail = myitems(j)
mail.FlagStatus = myOlSel.Item(1).FlagStatus
mail.FlagDueBy = myOlSel.Item(1).FlagDueBy
mail.FlagRequest = myOlSel.Item(1).FlagRequest
mail.FlagIcon = myOlSel.Item(1).FlagIcon
mail.ReminderSet = myOlSel.Item(1).ReminderSet
mail.ReminderTime = myOlSel.Item(1).ReminderTime
mail.Save
Next j

End If


End Sub


  #5  
Old January 16th 07, 07:46 PM posted to microsoft.public.outlook.program_vba
Gary E.
external usenet poster
 
Posts: 5
Default MailItem flags

"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."
  #6  
Old January 16th 07, 07:59 PM posted to microsoft.public.outlook.program_vba
Gary E.
external usenet poster
 
Posts: 5
Default MailItem flags

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."

  #7  
Old January 16th 07, 11:27 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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." wrote in message
...
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."


  #8  
Old January 17th 07, 08:28 PM posted to microsoft.public.outlook.program_vba
Gary E.
external usenet poster
 
Posts: 5
Default 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." wrote in message
...
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."



  #9  
Old January 18th 07, 12:11 AM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default MailItem flags

The old flags have been changed by Outlook 2007, if you look at the flagging
options you will see how much they've changed. Use a MAPI viewer such as
OutlookSpy to examine the properties on an item that you set to one of the
new flags to see what you should use in your code.

--
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." wrote in message
...
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


 




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
Follow-up flags MuNcHkiN Outlook - General Queries 5 October 7th 06 08:05 PM
Flags vortex2k4 Outlook and VBA 7 July 28th 06 03:27 PM
Help With Flags vortex2k4 Outlook and VBA 1 July 19th 06 11:18 AM
How can I create a MailItem that displays like a received MailItem ? Clive Outlook - Using Forms 0 February 27th 06 04:14 PM
Can I name Follow Up Flags for use with Contacts? Bill K Outlook - Using Contacts 0 February 1st 06 07:50 PM


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