sort over flagstatus

  • Thread starter Thread starter King Albert
  • Start date Start date
K

King Albert

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
 
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.
 
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
 
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.
 
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
 
Back
Top