Introduction

OELibrary is open source COM based component written in C++. I have created this component long back when I used to work with EfExtra e-solution pvt ltd. There it used to be closed source, paid software, but due to some personal and professional reason, this component has not able to see light of day. After around three year, when I enquired about the same, Saurabh (Director, EfExtra) happily agreed to launch project open source, rather then just lying idle in backup of computer.

His thinking behind this is that, at least programmer community gets benefited of it and the project might get more robust and feature rich after receiving feedback and working (multiple mind instead of single) . This component is released under GPL license. This component is RELEASE AS IS, without any warranties and guarantees.

This component is dedicated to My Mother Late Mrs. Saroj Gupta.

The Objective

The aim of this project is to create a programming library which enables automating, or in other words, providing programmatic access to certain tasks in Outlook Express.The central idea is to provide an easy to use object model to developers who wish to interact and control Outlook Express from their applications. Some of the functions this library aims to provide are:

Features

Add, Delete, & Enumerate mail folders in Outlook Express.

Enumerate, Read, and Delete messages in a given folder.

Move messages from one folder to another.

Get selected folder.

Notifications for certain events (e.g. new mail).

Adding a custom toolbar to Outlook Express and responding to click events on it.

Reading OEAccount information.

Manipulating the Window Address book!

Where it could be used ?

Outlook Express is a free email client and comes preinstalled with Microsoft Windows Operating Systems. Outlook Express is the most commonly used email client today.Outlook Express does not support automation by itself unlike Microsoft Outlook, which comes as a part of Microsoft’s Office suite. Microsoft Outlook provides a feature rich and easy to use object model allowing developers to automate most tasks in it.

Many developers who want to develop applications/plug-ins/add-ins for Outlook Express can’t do so because of its lack of any automation interface.The goal of this project is to fill this void and provide a library that can use used by developers to automate Outlook Express from their applications.

The library can be developed as a COM component (ActiveX DLL) that can be referenced by developers in their projects. The ActiveX component will provide a expose an object model similar to the automation interface of Microsoft Outlook. This insures that the developers who have already worked with Microsoft Outlook automation feel at ease working with our Outlook Express Automation Library. The ActiveX DLL will be developed as an ATL COM component so that it does not have any additional dependencies.

Using the code and some example

I am assuming that you already have the reference of EfOeLibrary in your Projects!. object model is quite simple, you just have to create the object of the Application and all thing what ever you want come from it.

would it be possible to share functional version of OELib for VS2008, or 2005, please? I can't make it run I used version available here, imported that to VS2008, corrected many "errors", unfortunately, there are some I can't go through... Thank you very much in advance, Tomas

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

I have download source and sample,and i have found a mistake in OnFolderNotification in OELib.As your idea,you catch the user change folder via type of FOLDERNOTIFYEX equal 8 although this parameter change when property of the folder change.Thus,when i use MoveMessage function,the property of source and destination has been change.Then OnFolderNotification function will be called ,and user folder selection be changed .

can i use this library in C#.net...? if yes...please post one example how to traverse the inbox items using this library using c# code.

Simply reference library in your project, you can easily use it!

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

Hi Thanks for reply!, i havn't check same for Windows Mail(Vista). could you please do me favour by testing same on vista! thanks!

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

I think it doese'nt support windows mail,Hope it'll be integrated soon.

Can't gurantee same.. sorry to inform you .. i haev stopped development on this product.. thats why i made it opensource, so that other person doesn't need to write anything from scratch..

I wouldn't gurantee you, but will check the interface of WindowsMail.. I hope would provide you new OeLib for windows mails!

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

I think, above library should work with WindowsMail, as it use same Interface underneath!..

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

I was really excited about your posting but then I was let down when I discovered I could not access the wab file as advertised. Am I missing something? Your OELibrary.chm lists WABContact but it does not seem to be available.

The dll i have provided is BASE DLL, you have to recompile the code with appropriate compiler option to get your WABCONTACT etc.

My personal suggestion would, extract the code of WAB from library and use it into your app.

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

Very impressive project. For some reason I have followed all steps but can't the .SetNotify callback to work for Inbox or Outbox folder. I have tried to run the NewMessage VB sample project unchanged to get the pInboxFolder_NewMsg event to fire when a new email is added to Inbox with no luck.

OELib_wTool.dll is registered ok in windows\system32 and other dlls OEHook and EFInject are copied to Windows folder.

ahh, i would i like to know how you want to implement same. you want to mail to be delivered than delete it without user consent or wanna something else.. i will more than happy to help you

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

Thanks for the reply. Description: There are alot of emails in the Inbox which are moslty spam. Using OE, we can select the mails and delete them. These mails are then moved to "DeletedFolder". Then, on deleted folder or Inbox, we can select the option from Message->Block sender. but it is long process by blocking mails one by one.

Now, want to automate the process, when I select all mails and then block senders of all of those, by using the block sender functionality already in OE.

- Cannot create more than one Bar- When i add more than one menu on the bar and try to add menuItems on menu1 and menu2, the items dupicates in each menu- Event "Click" on MenuItems and Button don't fire

with objOutlookMsg objOutlookRecip = .Recipients.Add("chipdori@hotmail.com") objOutlookRecip.Type = Outlook.OlMailRecipientType.olTo .Subject = "This is a test with Microsoft Outlook" .Body = "This is the body of the message." .Display()end with

Just a question: is it possible with OELibrary create a new message in MS Access with one (or more) attachment and send it trought Outlook Express?

Which methods should use?

you could attach the msaccess document (.mdb file i think) as attachment to OE Message!, i believe MS Access it self provide you functiionality for Outlook !

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

Sorry for late reply. No OeLib doesn't provide you interface to send you mail from it!

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

However, I am getting 2 errors as the following: \OELib\WABMenu.h(61) : error C2504: 'IWABExtInit' : base class undefined \OELib\WABMenu.h(97) : error C2061: syntax error : identifier 'WABEXTDISPLAY'What file Wab.h file do you use? When I try the VS 6.0 ones, they only get the above 2 errors. When I try other ones from VS 2003 to VS2008 to go with VS6, there are 97 errors.

However, when I try to upgrade the project into VS 2003, VS 2005 and VS 2008 They all seem to get through build, but the result DLL only has class names exposed to COM, In VB 6, most of those classes do not has member anymore. Any idea with this symptom?

However, since we have been using VS 2008 for over half a year since its beta releases. it is better to jump directly to VS 2008. As a VB programmer, I feel VS 2008 is the real choice for 6.0 programmers to think seriously about the next move. It is really more enjoyable to do VB programming work in VS 2008 than that in VS 6.0 now.

Since I have been programming with VB for over 15 years, I promise to review your VB samples and give you the code I do with the VB examples, If you feel OK, you can decide if you like to add them to your project then. Hopefully, you will like my little contribution to your motivation.

I have tried the VB sample code for WAB. Check with the attachment of my version of sample code. Hope you will like it.

However, I do encounter a problem when trying to add new Contact. When you click the [New Contact] button, it will get the following error: (see screenshot in the email) Then (see screenshot in the email) Instead of capture the error with in the VS 6.0, It crashes the whole Visual Studio – it get a hard dead.

Also it is important for me to add some stuff as far as I have played with it For example, I need to know Contact ID or entry ID I need to know Contact type – which folder it is from … Can you send the VS 2005 project to me so that I can play with it and trying to add what I think we need?

When you click the [New Contact] button,it will get the following error:(see screenshot in the email) Then(see screenshot in the email) Instead of capture the error with in the VS 6.0, It crashes the whole Visual Studio – it get a hard dead.

Also it is important for me to add some stuff as far as I have played with itFor example, I need to know Contact ID or entry IDI need to know Contact type – which folder it is from

currently i don't access to my mails.. i will check that out! will get back to you by start of tommorow!

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David CrowNever mind - my own stupidity is the source of every "problem" - Mixture

btw, did you try http://www.codeproject.com/KB/COM/Outlook_Express_Messages.aspx[^] before? any comments?

I could say base interfaces are same.. but difference is that this is opensource component and they have paid source.. please don't misunderstood my above comment. I nor truly opensource neither paid source supporter. i am just giving back the programmer community, what i got from them.

Sir, if you see when i started my career around 4 yr back, Gui based RunEx application written by taught me many thing

"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow"If it were machines, the pair_programming seem to work, but for humans it is pair_crackdown that seems to work! " - NisamudheenNever mind - my own stupidity is the source of every "problem" - Mixture