Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / July 2006

Tip: Looking for answers? Try searching our database.

Flags

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vortex2k4 - 26 Jul 2006 16:06 GMT
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
Guy Lapierre - 26 Jul 2006 23:44 GMT
Is the flag being used for on an email, contact, task, etc?
Signature

Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com

> Hi
>
[quoted text clipped - 7 lines]
>
> Lawrence
vortex2k4 - 27 Jul 2006 10:44 GMT
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

> Is the flag being used for on an email, contact, task, etc?
> --
[quoted text clipped - 14 lines]
> >
> > Lawrence
Guy Lapierre - 27 Jul 2006 14:46 GMT
Looping through the collection with a For Each loop should work.

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

Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com

> Thanks but I sorted it out. Didnt set my sort up properly so it was
> flagging wrong thing!
[quoted text clipped - 25 lines]
> > >
> > > Lawrence
Ken Slovak - [MVP - Outlook] - 27 Jul 2006 16:23 GMT
Never use a For...Each loop to delete items from a collection. Use a down
counting For loop.

Signature

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

> Looping through the collection with a For Each loop should work.
>
> For Each Item in Collection
>   If flag is red delete
> Next
Guy Lapierre - 27 Jul 2006 20:17 GMT
Yes, a much better suggestion. I tend to not build any loops that delete
data. The concept just scares me.
Signature

Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com

> Never use a For...Each loop to delete items from a collection. Use a down
> counting For loop.
[quoted text clipped - 4 lines]
> >   If flag is red delete
> > Next
vortex2k4 - 28 Jul 2006 11:12 GMT
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

> Yes, a much better suggestion. I tend to not build any loops that delete
> data. The concept just scares me.
[quoted text clipped - 25 lines]
> > > http://www.forefrontbusinesssolutions.com
> > > http://www.forefrontbusiness.com
Ken Slovak - [MVP - Outlook] - 28 Jul 2006 15:27 GMT
FlagRequest for the text for the flag, FlagIcon for the color of the flag.

Signature

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

> 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
[quoted text clipped - 14 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.