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

Help With Flags



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 19th 06, 10:28 AM posted to microsoft.public.outlook.program_vba
vortex2k4
external usenet poster
 
Posts: 9
Default Help With Flags

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?

  #2  
Old July 19th 06, 11:18 AM posted to microsoft.public.outlook.program_vba
vortex2k4
external usenet poster
 
Posts: 9
Default Help With Flags

Actually I have got it to work now. Needed to use .save and .flagicon
together.

 




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
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
Outlook 2003 - Colour Flags need rename by edit DrWizard Outlook - General Queries 1 January 24th 06 03:42 PM


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