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

Button Filter



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 9th 07, 03:46 PM posted to microsoft.public.outlook.program_vba
Scott
external usenet poster
 
Posts: 118
Default Button Filter

Hi all - I would like to know how I could filter my mail by a specific age by
clicking a button on the Outlook 2003 tool bar. I have a filtered view with
the default 7 days that Outlook provides, but I would like to modify this to
166 days and have it display all messages in my inbox (again, by click a
button). Any suggestions on how I can tackle this?
Ads
  #2  
Old January 10th 07, 05:44 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Button Filter



For getting the query syntax you can build the query by customizing the
view, create the filter with the wizard and then see the SQL page.

E.g., this one is for all items received at or after 1.1.2000:

"urn:schemas:httpmail:datereceived" = '01.01.2000 00:00'

You can modify the current view by the
Explorer.CurrentFolder.CurrentView.Xml property. Print out some examples to
see how the Xml string must look like.

For your requirement I think you'd have to build the query new each day. Use
the function DateAdd("d", -166, Date) and insert the returned value into the
SQL query.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Tue, 9 Jan 2007 07:46:01 -0800 schrieb Scott:

Hi all - I would like to know how I could filter my mail by a specific age

by
clicking a button on the Outlook 2003 tool bar. I have a filtered view

with
the default 7 days that Outlook provides, but I would like to modify this

to
166 days and have it display all messages in my inbox (again, by click a
button). Any suggestions on how I can tackle this?

 




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
Filter? V Green Outlook Express 8 December 11th 06 09:24 AM
Spam Filter lgoler Outlook - General Queries 1 August 16th 06 04:35 PM
Button location in button bar Leah Ann Add-ins for Outlook 1 August 11th 06 02:16 PM
Spam Filter darkrats Outlook Express 1 April 21st 06 01:11 AM
Filter and regexp Ludovic Outlook - General Queries 2 April 1st 06 09:37 PM


All times are GMT +1. The time now is 10:31 AM.


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.