sort over flagstatus

Status
Not open for further replies.
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.

Sue Mosher

"King Albert" <king.albert2@forpresident.com> wrote in message

news:Xns9C40916EF1F9kingalbert2forpresid@69.16.176.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
 
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]" <suemvp@turtleflock.com> wrote in

news:uiopkgj$JHA.200@TK2MSFTNGP05.phx.gbl:


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

"King Albert" <king.albert2@forpresident.com> wrote in message

news:Xns9C409B7E24870kingalbert2forpresid@69.16.176.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]" <suemvp@turtleflock.com> wrote in
> news:uiopkgj$JHA.200@TK2MSFTNGP05.phx.gbl:
>
> > 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" <king.albert2@forpresident.com> wrote in message
> news:Xns9C40916EF1F9kingalbert2forpresid@69.16.176.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.
 
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]" <suemvp@turtleflock.com> wrote in

news:#4YTyMk$JHA.4376@TK2MSFTNGP04.phx.gbl:


> 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.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M using excel to sort outlook appointment items Outlook VBA and Custom Forms 4
J Outlook 365 Outlook Macro to Sort emails by column "Received" to view the latest email received Outlook VBA and Custom Forms 0
A Any way to force sort by/group by on search results with VBA? Outlook VBA and Custom Forms 1
Witzker print-list-of-outlook-folders with sort posibility Outlook VBA and Custom Forms 7
King Mustard Sort search groups by amount of items? Using Outlook 1
A Custom VBA to sort emails into folders Outlook VBA and Custom Forms 0
D Sort Problem with Sent Folders Using Outlook 1
D [TOOL] QuickModules to sort emails very quickly to multiple folders Outlook VBA and Custom Forms 1
E Outlook 2010 Subject sort uses Thread-Topic for grouping Using Outlook 2
A Sort emails into subfolders based on sender and deleting emails automatically Outlook VBA and Custom Forms 3
Diane Poremsky Sort messages by Sender domain Using Outlook 1
J Can I sort meeting requests by the date of meeting? Using Outlook 4
T VBA to Sort Rules [A-Z] - code provided Outlook VBA and Custom Forms 9
P Is it possible to sort emails by COUNT of "From" field? Using Outlook 2
L Sort bar at top of inbox preview outlook 2013 Using Outlook 1
C Outlook 2010, Need to restrict domain users from installing any sort of a addin in outlook Using Outlook 2
J How to sort incoming email that is sent to a different address to my main one? Using Outlook 1
D Contacts Sort Order Using Outlook 0
kburrows Office 365 - Contacts Sort First, Last instead of Last, First. How to Reset? Using Outlook 4
I 2013 Calendar sort date Using Outlook 3
F Not keep sort order after re-change column Using Outlook 1
J outlook having sort by date or from unable to display sender name. Using Outlook 2
J Macro to periodically sort emails by flag status? Using Outlook 1
2 Sort taks by folder then by date? Using Outlook 5
S Outlook 2007 Sort Column Shading Using Outlook 1
S Public FolderEmail Sort Problems Outlook 2010/Migration from 2003 SBS to 2011S Using Outlook 3
D Sort e-mail by sender's domain - Outlook 2007 Using Outlook 2
B outlook sort by Using Outlook 2
A Sorting of existing contact in Outlook 2003 just will not sort Using Outlook 2
J Outlook 2010 Inbox sort FROM column not working Using Outlook 29
S changing number sort BCM (Business Contact Manager) 1
B Macro to Change sort and collapse groups in Mail folder Outlook VBA and Custom Forms 9
L Interating throught a task list, respecting sort rules in the view Outlook VBA and Custom Forms 1
A How to Sort by Unread and then Read mail in Outlook 2007 Using Outlook 7
S How do i sort email by Domain? Outlook VBA and Custom Forms 2

Similar threads

Back
Top