HOWTO: EWS: Find all folders inside a parent folder, helpful in generating a folder tree

Looks cool isn’t it? I have created this folder tree for my mailbox using Exchange Web Services. You can do the very same. Here is the code which I am using to get all the folders inside a folder and recursively go deep-n-deep until your reach the core. Here is the sample code…          …

11

HOWTO: OOM: Getting Primary SMTP Address from X500

Getting primary address from X500 address was always a pain when using OOM. Thank to these guys who realized this pain and built in this functionality in Outlook 2007 Object Model. I have figured out a way to get this value from within OOM for Outlook 2003 & below as well. How it works ============…

5

HOWTO: EWS: Add attachments to existing items on server

Forgot to add that attachment? Using exchange web service you can add it back to the item on the server. The code is simple and very easy to understand. It takes two parameters itemID – where attachment will be added, & strFileName – complete path to the local file. private bool AddAttachment(String itemID,String strFileName) {…

4

HOWTO: EWS: Get LastModifiedTime for Items

So wondering where is LastModifiedTime? Exchange Web Services does not seem to give you the hint when the item was last modified. This property is not available in ItemType and expected to be available only after Exchange 2007 SP1. You can get the LastModifiedTime with the help of ExtendedProperty. I have created a sample to…

4

HOWTO: EWS: Use GetAttachment to download attachments off Mail/Appointment

I have fallen for exchange web services. There are endless possibilities with exchange web services, and product group is still working to make it even better. Today I have created a neat sample to download attachments off Exchange Server Sample: DownloadAttachments Input Params: itemID , folder public void DownloadAttachments(string itemID,string folder) { ExchangeServiceBinding esb =…

17

EWS: BillingInformation is available only to TaskType

If you have ever tried to update BillingInformation of any item, other than tasks, using EWS then you may already know that BillingInformation is missing from Exchange Web Services object model and available only to TaskType. Although if you check the Outlook 2007 object model, it is available for MailItem, TaskItem, AppointmentItem, and to many…

1

HOWTO: GetFolder, FindItem, Restriction, GetItem

This is an attempt to extend my previous code sample Getting into a folder by path using EWS With this code sample I have demonstrated HOWTO find items under a folder. I have used Restriction to list down all the "IPM.Note" items falling under a specified date/time span. class EWS_SAMPLE { static void Main(string[] args)…

16

HOWTO: Delete a Outlook Search Folder programatically

Search folders are very useful but there is no way available using Outlook Object Model to delete them, you need CDO to delete them. Below code can help you remove the SearchFolders from Outlook Function RemoveSearchFolder(ByVal strProfile, ByVal strFolderName As String) As Boolean Const CdoPR_FINDER_ENTRYID = &H35E70102 Dim objSession As MAPI.Session Dim objInfostore As MAPI.InfoStore…

1

Microsoft a.k.a. Challenges !

Microsoft is a company full of challenges where challenges turns into opportunities, opportunities which makes you feel out of this world. You see technology, you feel technology, you live technology, technology which drive this world. To give you a brief about myself, I joined Microsoft on 22nd June 2006. I have to say time really fly and I…

5