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 7963435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:36:24+00:00 2026-06-04T05:36:24+00:00

My c sharp program currently gets outlook emails and imports them into a dataset.

  • 0

My c sharp program currently gets outlook emails and imports them into a dataset. However, I am only getting the subject of each email.

I am using Microsoft.Office.Interop.Outlook.Folder olCurrFolder; which I use this variable to get the subject (olCurrFolder gets set from another loop). In order to get the subject I do this:

intMailCount = olCurrFolder.Items.Count;

for (int i = 1; i <= intMailCount; i++)
{
    strSubject = olCurrFolder.Items[i].Subject;
    strEmailReceived = olCurrFolder.Items[i].Received;
}

As you can see, I am also trying to get the received date, but Items[i].Received does not work. The intellisense does not pull up anything when I type a period after Items[i] and a message says it will be resolved at runtime. I have no idea what the other fields are called (i.e. Received Date, From, Size).

Is there a list that has the field names I am looking for?

  • 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-06-04T05:36:25+00:00Added an answer on June 4, 2026 at 5:36 am

    The documentation for the Outlook MailItem object is here: http://msdn.microsoft.com/en-us/library/aa210946(v=office.11).aspx

    You can use the ReceivedTime property to get the received date and time.

    The reason that intellisense sometimes doesn’t work with VSTO is that many of the properties return a dynamic. A dynamic is treated like an object that supports every method and property imaginable. This is what prevents intellisense from working. If you use a nonexistent method, it will compile, but fail at runtime.

    I find the MSDN documentation is invaluable when working with dynamics in VSTO.

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

Sidebar

Related Questions

Programs on Linux install data for programs into $PREFIX/share/programname , how does the program
I have a build error in a c sharp program that I am compiling
I am making a program in c sharp/xaml. I have a save button, and
I currently program a program which uses multiple threads. To be able to share
I'm currently trying to develop a program which stores lots of data, similar to
I am trying to run a batch script from within a c sharp program
I'm currently trying to write a program in VB.NET which fluidly changes the DWM
Can someone share a good way to save the program state (UINavigationController stack, etc)
What C-sharp type can I serialize to get JSON object with format name:[[1,2,3],[1,2,3],[1,2,3]] If
I wonder why F-Sharp doesn't support infinity. This would work in Ruby (but not

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.