Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7527263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:04:11+00:00 2026-05-30T04:04:11+00:00

I’m writing a work management application in C# for my team at work (because

  • 0

I’m writing a work management application in C# for my team at work (because our stupid employer didn’t give us any appropriate tools). I need to check for new messages in Outlook every once in a while and I need to get messages since the last time I checked them.

I’ve tried the Items.Restrict() method and used the filter "[ReceivedTime] > ' "+lastUpdate+" ' ", but it doesn’t seem to work correctly. I’ve probably tried every possible format of lastUpdate – converted to universal time, to string, to US date/time format. NOTHING works correctly. It either gives me messages in absolutely different time range or doesn’t find any msgs at all.

Any idea what I’m doing wrong? I’m also thinking about using AdvancedSearch() but will it be easy and quick to implement? Thanks in advance for your replies!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:04:12+00:00Added an answer on May 30, 2026 at 4:04 am

    OK, I’ve wasted some more time on this and found a simplier solution which doesn’t force me to rewrite my whole application from scratch.

    Instead of using the Items.Restrict() method to get the latest messages I’m using Items.Sort() to sort them by ReceivedTime and then loop through the first messages from the Items list until I find a message which is older than my last update timestamp.

    Example:

    givenFolder.Items.Sort("[ReceivedTime]", true); //true means, it will be descending (latest at the beginning)
    

    This solution, unfortunately, has a drawback because Items.Sort() seems to work only in Exchange mailbox (doesn’t sort properly in ordinary POP mailbox) but I need it only for Exchange anyway, so it’s enough for me.

    I think, it’s also possible to use Outlook’s AdvancedSearch or MAPI tables but I haven’t tried that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am writing an app with both english and french support. The app requests
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.