views:

85

answers:

2

hi!

I have an issue here where we need to control outlook from Embarcadero Delphi 2010.

we used today some thirdparty components for opening the mail sending window, this worked some timeago. but now it seem to fail on newer outlook versions.

are there any component out there dedicated to controlling outlook from Delphi, or are there any MAPI clients that can work as a better replacement for this.

what we need to do basically is to: 1. Start new message in outlook (sending recipient as parameter) 2. receive the sent message so we can store it 3. drag and drop messages from outlook to our application.

if the enduser do not use outlook, a normal MAPI would suffice as replacement.

where do I find a good robust component for doing such job for me ?

+3  A: 

For the first two steps regular OLE automation using the Outlook2000.pas unit that comes bundled with Delphi should work fine though you might want to take a look at Dmitry Streblechenko's Redemption library: http://dimastr.com/redemption/ which simplifies many of the more low-level (Extended-)MAPI tasks significantly.

For intercepting the sent message you should create an instance of TItems and connect it to the folder reference you could get from OutlookApplication.Session.GetDefaultFolder(olFolderSentMail). You can then assign an event handler to its OnItemAdd event.

For drag & drop from Outlook into your application you can take a look at Anders Melanders excellent (and free) Drag&Drop library (includes examples for interacting with Outlook): http://melander.dk/delphi/dragdrop/

Oliver Giesen
+1  A: 

I've used these components a long time ago and they were fantastic

http://www.add-in-express.com/add-in-delphi/

Here are some features for Outlook

http://www.add-in-express.com/add-in-delphi/programming-outlook.php

kdunlapmo
Add-in-Express is great indeed, but it will not help you to control Outlook from the *outside*. It's only for creating Office-Addins that run *inside* Outlook...
Oliver Giesen