Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / May 2008

Tip: Looking for answers? Try searching our database.

.Restrict a Contact folder using the LastModificationTime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thatch - 28 May 2008 01:21 GMT
I'm trying to use the .restrict function in Outlook to find out the latest
batch of contacts that have been updated on a contact folder. However, this
works if you only use the date. If you use a time with the date, it just does
not work.
For example:
   oContactsUpdated = oContacts.Items.Restrict("[LastModificationTime] >
'5/5/2008')
   This call works and returns all the contacts that have been modified
after 5/5/2008. However, if you want to finetune the restriction by adding
the time,
it fails. For example, I want to find out all the contacts that have been
modified after 2pm on 5/5/2008. i.e.
   oContactsUpdated = oContacts.Items.Restrict("[LastModificationTime] >
'5/5/2008 14:00:00')

That call returns 0, no matter what time I put. I have tried #5/5/2008
14:00:00# and that fails also.

Is there a way to use .Restrict on a date field with date and time that
works??
JP - 28 May 2008 01:43 GMT
I think if you drop the "seconds" portion of the time value, it should
work.

i.e.

14:00

not

14:00:00

--JP

> I'm trying to use the .restrict function in Outlook to find out the latest
> batch of contacts that have been updated on a contact folder. However, this
[quoted text clipped - 16 lines]
> Is there a way to use .Restrict on a date field with date and time that
> works??
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.