Help With Flags

  • Thread starter Thread starter vortex2k4
  • Start date Start date
V

vortex2k4

I am trying to create a simple program which goes through inbox
replacing mail with no flag with a blue flag.

This is the code i have so far:

Sub GetEmailItem()
Dim emlSecond As MailItem
Dim nsMyNameSpace As NameSpace
Dim fdrInbox As MAPIFolder
Dim varNummsg As Integer

Set nsMyNameSpace = Application.GetNamespace("MAPI")
Set fdrInbox = nsMyNameSpace.GetDefaultFolder(olFolderInbox)
Dim i As Integer

varNummsg = fdrInbox.Items.Count

For i = 1 To varNummsg

Set emlSecond = fdrInbox.Items.Item(i)

If emlSecond.FlagStatus = olNoFlag Then
emlSecond.FlagIcon = olBlueFlagIcon



End If



Set emlSecond = Nothing
End Sub


But when it runs although the vaue of flagstatus changes, the flags
dont change in Outlook.

Any Ideas?
 
Back
Top