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

sort over flagstatus



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 6th 09, 02:19 PM posted to microsoft.public.outlook.program_vba
King Albert
external usenet poster
 
Posts: 3
Default sort over flagstatus


Hi,

In my inbox I have a folder "Servers"
That folder is populated by mails that either I moved or created there
using VBS. The script flags these mails Red, Green, Blue and Yellow based
on different criteria.

As a final step the script needs to sort (or rather group) these mailitems
by flagcolor. When I arrive at work I want my server reports grouped by
color.

I came across items.sort "somekey" , started looking for its "flag"
equivalent and then read a disconcerting post from Sue Mosher that sorting
this way isn't going to cut it in the GUI anyway.


please give me a few pointers to solve this


thx


Ward
Ads
  #2  
Old July 6th 09, 02:49 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default sort over flagstatus

Have you tried using the View | Current View | Define Views command to
create a new named view with the layout you want? If you continue to have
problems with this, please state your Outlook version.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"King Albert" wrote in message
.253...

Hi,

In my inbox I have a folder "Servers"
That folder is populated by mails that either I moved or created there
using VBS. The script flags these mails Red, Green, Blue and Yellow based
on different criteria.

As a final step the script needs to sort (or rather group) these mailitems
by flagcolor. When I arrive at work I want my server reports grouped by
color.

I came across items.sort "somekey" , started looking for its "flag"
equivalent and then read a disconcerting post from Sue Mosher that sorting
this way isn't going to cut it in the GUI anyway.


please give me a few pointers to solve this


thx


Ward



  #3  
Old July 6th 09, 03:18 PM posted to microsoft.public.outlook.program_vba
King Albert
external usenet poster
 
Posts: 3
Default sort over flagstatus

I hadn't thought of that, but I tried it just now.

In the GUI it works: if I select the "Servers" view mailitems are sorted
by flagcolor.


In the script I added this line I discovered in one of your previous
posts :


ol.ActiveExplorer.CurrentView = "Servers"


But it didn't change the default view in that folder after it ran (with
on error switched off and no faults)



The script expects its mails in the Servers folder, when runs it creates
a new subfolder

With serverfolder
Set nieuwefolder =.Folders.add("Servers " & Date)
...



and then starts to flag and move the mailitems. Every run it deletes the
folder from 7 days ago.


It would be cool if we could attach the "Servers view" to these newly
created folders.


Target is Outlook 2003


thank you !


Ward




"Sue Mosher [MVP]" wrote in
:

Have you tried using the View | Current View | Define Views command to
create a new named view with the layout you want? If you continue to
have problems with this, please state your Outlook version.


  #4  
Old July 6th 09, 03:44 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default sort over flagstatus

From your description, it sounds like Servers may be a view with the scope
"on this folder visible to everyone," which means it cannot be used on other
folders. Make a copy of that view with the scope "on all Mail and Post
folders," so that it can be used on any folder.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"King Albert" wrote in message
6.253...
I hadn't thought of that, but I tried it just now.

In the GUI it works: if I select the "Servers" view mailitems are sorted
by flagcolor.


In the script I added this line I discovered in one of your previous
posts :


ol.ActiveExplorer.CurrentView = "Servers"


But it didn't change the default view in that folder after it ran (with
on error switched off and no faults)



The script expects its mails in the Servers folder, when runs it creates
a new subfolder

With serverfolder
Set nieuwefolder =.Folders.add("Servers " & Date)
...



and then starts to flag and move the mailitems. Every run it deletes the
folder from 7 days ago.


It would be cool if we could attach the "Servers view" to these newly
created folders.


Target is Outlook 2003


thank you !


Ward




"Sue Mosher [MVP]" wrote in
:

Have you tried using the View | Current View | Define Views command to
create a new named view with the layout you want? If you continue to
have problems with this, please state your Outlook version.


"King Albert" wrote in message
.253...

Hi,

In my inbox I have a folder "Servers"
That folder is populated by mails that either I moved or created there
using VBS. The script flags these mails Red, Green, Blue and Yellow based
on different criteria.

As a final step the script needs to sort (or rather group) these
mailitems
by flagcolor. When I arrive at work I want my server reports grouped by
color.

I came across items.sort "somekey" , started looking for its "flag"
equivalent and then read a disconcerting post from Sue Mosher that
sorting
this way isn't going to cut it in the GUI anyway.



  #5  
Old July 6th 09, 06:05 PM posted to microsoft.public.outlook.program_vba
King Albert
external usenet poster
 
Posts: 3
Default sort over flagstatus

No it was right first time, but I did trip over objectvariable references
like I shouldn't anymore :-)


Set ol.ActiveExplorer.CurrentFolder = nieuwefolder
ol.ActiveExplorer.CurrentView = "Servers"



Thank you very much !

Ward



"Sue Mosher [MVP]" wrote in
:

From your description, it sounds like Servers may be a view with the
scope "on this folder visible to everyone," which means it cannot be
used on other folders. Make a copy of that view with the scope "on all
Mail and Post folders," so that it can be used on any folder.


 




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
How to sort on birthdays geekseeker Outlook - Calandaring 2 December 15th 08 01:44 AM
FlagStatus question Salad Outlook and VBA 4 November 7th 08 04:01 PM
How to sort E-mails? Marek Staniewski Outlook - General Queries 0 June 29th 07 10:13 AM
Sort Rules Art Beck Outlook Express 6 November 4th 06 03:49 PM
sort by several categories Bill M Outlook - Using Contacts 1 July 4th 06 10:07 AM


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