---
title: "How to fetch Outlook email body using C#?"  
description: "How to fetch Outlook email body using C#?"  
author: "Anonymous User"  
published: 2013-11-14  
updated: 2013-11-14  
canonical: https://www.mindstick.com/forum/1738/how-to-fetch-outlook-email-body-using-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to fetch Outlook email body using C#?

I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to make a [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) that fetches the [body](https://yourviews.mindstick.com/story/2120/rare-species-having-electricity-in-their-body) of an [email](https://www.mindstick.com/articles/12870/10-easy-ways-to-manage-your-business-email-inbox) with a given [search](https://www.mindstick.com/articles/65368/best-smo-services-company-in-hyderabad-improve-search-rankings) criteria. When I [fetch](https://www.mindstick.com/forum/156159/what-is-google-fetch) [items](https://www.mindstick.com/forum/33812/getting-number-of-items-selected-in-uicollectionview-in-ios) from the mailbox and try to get the body, it only writes part of the body. I want ALL [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) from the body instead. How can I do this? This is what I have so far:

```
Outlook.Application myApp = new Outlook.Application();        const string PR_HAS_ATTACH = "http://schemas.microsoft.com/mapi/proptag/0x0E1B000B";        // Obtain Inbox        Outlook.Folder folder = myApp.Session.GetDefaultFolder(OlDefaultFolders.olFolderInbox) as Microsoft.Office.Interop.Outlook.Folder;        Outlook.Table table = folder.GetTable(Microsoft.Office.Interop.Outlook.OlTableContents.olUserItems);        // Remove default columns        table.Columns.RemoveAll();        // Add using built-in name        table.Columns.Add("Subject");        table.Columns.Add("ReceivedTime");        table.Sort("ReceivedTime", Microsoft.Office.Interop.Outlook.OlSortOrder.olDescending);        // Add using namespace        // Date received        table.Columns.Add("urn:schemas:httpmail:textdescription");        while (!table.EndOfTable)        {            Outlook.Row row = table.GetNextRow();            if (row["Subject"].ToString().ToLower().Contains(subject.Text.ToLower()) && row["ReceivedTime"].ToString().Contains(cellCreationDate))            {                                   body.Text = row["urn:schemas:httpmail:textdescription"].ToString();            }        }
```

## Replies

### Reply by Anonymous User

Hi Jay,\

Here is an alternative.

```
// change this in your codebody.Text =row["urn:schemas:httpmail:textdescription"].ToString();// To this Microsoft.Office.Interop.Outlook.MailItem mailItem =                            
myApp.Session.GetItemFromID(row["EntryID"]);body.Text = mailItem.Body;
```


---

Original Source: https://www.mindstick.com/forum/1738/how-to-fetch-outlook-email-body-using-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
