View Single Post
  #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.



Ads