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

How to find a date



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 17th 06, 02:48 PM posted to microsoft.public.outlook.program_vba
ivan
external usenet poster
 
Posts: 5
Default How to find a date

Hy everybody,
I need an help, I have to find in my deault folder some emails recieved
before a particular date, for example 1 Mars 2006.
Set Myitem = Myitems.find(StrSearch)
How should be String StrSearch?

Thanks a lot

Ivan


  #2  
Old March 17th 06, 03:16 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to find a date

See http://www.outlookcode.com/d/finddate.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Ivan" anonymous wrote in message ...
Hy everybody,
I need an help, I have to find in my deault folder some emails recieved
before a particular date, for example 1 Mars 2006.
Set Myitem = Myitems.find(StrSearch)
How should be String StrSearch?

Thanks a lot

Ivan


  #3  
Old March 17th 06, 04:58 PM posted to microsoft.public.outlook.program_vba
ivan
external usenet poster
 
Posts: 5
Default How to find a date

Thank you Sue,
I saw that page, but the example is about the calendar Folder, i'm working
with Inbox folder, VBA returns me an error because it doesn't know the
object [Start], maybe could be another name


"Sue Mosher [MVP-Outlook]" ha scritto nel messaggio
...
See http://www.outlookcode.com/d/finddate.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Ivan" anonymous wrote in message
...
Hy everybody,
I need an help, I have to find in my deault folder some emails recieved
before a particular date, for example 1 Mars 2006.
Set Myitem = Myitems.find(StrSearch)
How should be String StrSearch?

Thanks a lot

Ivan




  #4  
Old March 18th 06, 01:22 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to find a date

The basic syntax, which Ken also gave you, applies to any date field.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Ivan" anonymous wrote in message ...
Thank you Sue,
I saw that page, but the example is about the calendar Folder, i'm working
with Inbox folder, VBA returns me an error because it doesn't know the
object [Start], maybe could be another name


"Sue Mosher [MVP-Outlook]" ha scritto nel messaggio
...
See http://www.outlookcode.com/d/finddate.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Ivan" anonymous wrote in message
...
Hy everybody,
I need an help, I have to find in my deault folder some emails recieved
before a particular date, for example 1 Mars 2006.
Set Myitem = Myitems.find(StrSearch)
How should be String StrSearch?

Thanks a lot

Ivan




  #5  
Old March 17th 06, 04:16 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to find a date

From the Object Browser help on Items.Restrict:

sFilter = "[LastModificationTime] '" & _

Format("1/15/99 3:30pm", "ddddd h:nn AMPM") & "'"

Modify that to:
sFilter = "[ReceivedTime] '" & Format("3/1/06 3:30pm", "ddddd h:nn AMPM")
& "'"

Don't use seconds in a filter.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Ivan" anonymous wrote in message
...
Hy everybody,
I need an help, I have to find in my deault folder some emails recieved
before a particular date, for example 1 Mars 2006.
Set Myitem = Myitems.find(StrSearch)
How should be String StrSearch?

Thanks a lot

Ivan


  #6  
Old March 17th 06, 05:27 PM posted to microsoft.public.outlook.program_vba
ivan
external usenet poster
 
Posts: 5
Default How to find a date

That's the way!
Thank you Ken
Have a nice week end
"Ken Slovak - [MVP - Outlook]" ha scritto nel messaggio
...
From the Object Browser help on Items.Restrict:

sFilter = "[LastModificationTime] '" & _

Format("1/15/99 3:30pm", "ddddd h:nn AMPM") & "'"

Modify that to:
sFilter = "[ReceivedTime] '" & Format("3/1/06 3:30pm", "ddddd h:nn
AMPM") & "'"

Don't use seconds in a filter.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Ivan" anonymous wrote in message
...
Hy everybody,
I need an help, I have to find in my deault folder some emails recieved
before a particular date, for example 1 Mars 2006.
Set Myitem = Myitems.find(StrSearch)
How should be String StrSearch?

Thanks a lot

Ivan




 




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 use Find Now? The Hun Outlook - General Queries 2 February 9th 06 04:41 AM
Find and advance find does not find anything ever Terri Schoerner Outlook - Using Contacts 1 February 1st 06 10:40 PM
date fields - link the calander pop-up to a custom date field Tom Outlook - Using Forms 0 January 23rd 06 10:13 PM
2003 calendar's find, doesn't find items created today till tomarr Support7556 Outlook - Calandaring 11 January 20th 06 10:54 PM
Exporting Date received and Date Sent to Access Sugarthebeet Outlook - General Queries 1 January 19th 06 09:06 PM


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