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

Flags



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 26th 06, 04:06 PM posted to microsoft.public.outlook.program_vba
vortex2k4
external usenet poster
 
Posts: 9
Default Flags

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

Ads
  #2  
Old July 26th 06, 11:44 PM posted to microsoft.public.outlook.program_vba
Guy Lapierre
external usenet poster
 
Posts: 4
Default Flags

Is the flag being used for on an email, contact, task, etc?
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com


"vortex2k4" wrote:

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


  #3  
Old July 27th 06, 10:44 AM posted to microsoft.public.outlook.program_vba
vortex2k4
external usenet poster
 
Posts: 9
Default Flags

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


Guy Lapierre wrote:

Is the flag being used for on an email, contact, task, etc?
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com


"vortex2k4" wrote:

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



  #4  
Old July 27th 06, 02:46 PM posted to microsoft.public.outlook.program_vba
Guy Lapierre
external usenet poster
 
Posts: 4
Default Flags

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

For Each Item in Collection
If flag is red delete
Next
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com


"vortex2k4" wrote:

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


Guy Lapierre wrote:

Is the flag being used for on an email, contact, task, etc?
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com


"vortex2k4" wrote:

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




  #5  
Old July 27th 06, 04:23 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Flags

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

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


"Guy Lapierre" wrote in message
...
Looping through the collection with a For Each loop should work.

For Each Item in Collection
If flag is red delete
Next
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com


  #6  
Old July 27th 06, 08:17 PM posted to microsoft.public.outlook.program_vba
Guy Lapierre
external usenet poster
 
Posts: 4
Default Flags

Yes, a much better suggestion. I tend to not build any loops that delete
data. The concept just scares me.
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com


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

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

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


"Guy Lapierre" wrote in message
...
Looping through the collection with a For Each loop should work.

For Each Item in Collection
If flag is red delete
Next
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com



  #7  
Old July 28th 06, 11:12 AM posted to microsoft.public.outlook.program_vba
vortex2k4
external usenet poster
 
Posts: 9
Default Flags

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

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


Guy Lapierre wrote:

Yes, a much better suggestion. I tend to not build any loops that delete
data. The concept just scares me.
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com


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

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

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


"Guy Lapierre" wrote in message
...
Looping through the collection with a For Each loop should work.

For Each Item in Collection
If flag is red delete
Next
--
Guy Lapierre
Forefront Business Solutions
http://www.forefrontbusinesssolutions.com
http://www.forefrontbusiness.com




  #8  
Old July 28th 06, 03:27 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Flags

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

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


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

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


 




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
Help With Flags vortex2k4 Outlook and VBA 1 July 19th 06 11:18 AM
Is there any way to customize the drop down menu for flags in cont smoran Outlook - Using Contacts 1 July 12th 06 11:52 PM
dynamically set flags according to message age axtens Outlook - General Queries 1 March 20th 06 01:24 PM
set flags according to age of message axtens Outlook and VBA 1 February 27th 06 03:57 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 03:15 AM.


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.