Flags

V

vortex2k4

Hi

I have a flag in outlook which is ticked (completed) however when
viewing it in VBA the flagicon is coming out as Green and the
flagstatus as Marked (even though it should be completed). Is this a
result of a previous bit of bad coding? And if so is there a way to
correct it easily?

Thanks



Lawrence
 
V

vortex2k4

Thanks but I sorted it out. Didnt set my sort up properly so it was
flagging wrong thing!

Another question, is there an easy way to delete all red flags in my
email folder?

Using a for loop is difficult as when an item is deleted the number
order is all wrong and i cant get my head around it lol

Cheers
 
G

Guest

Looping through the collection with a For Each loop should work.

For Each Item in Collection
If flag is red delete
Next
 
K

Ken Slovak - [MVP - Outlook]

Never use a For...Each loop to delete items from a collection. Use a down
counting For loop.
 
V

vortex2k4

Thanks for that, i was trying to do an upward for loop, which was
always failing halfway through due to the deleting of data messing up
the order.

Never thought of using a down loop, and it works perfectly
now....thanks :D

One more question for you guys/gals is if you can sort a folder by a
flag?

i.e. Set itms = objInbox.Items
itms.Sort "[Subject]"

where subject is sorted, but i can not find the right syntax for flag

Any help would be appreciated.


Thanks
 
K

Ken Slovak - [MVP - Outlook]

FlagRequest for the text for the flag, FlagIcon for the color of the flag.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top