start outlook from within my application

Posted on 1998-12-22
Last Modified: 2010-04-04
How can I startup Outlook from within my delphi3 application, for example to send a message?
Question by:dummyy
  • 3
  • 2
LVL 10

Accepted Solution

viktornet earned 50 total points
ID: 1352469
ShellExecute(0, 'open', 'Outlook.exe', nil, nil, SW_SHOWNORMAL);


Expert Comment

ID: 1352470
You can better use the TEmail component.
It directly uses MAPI functions so that you can compose messages within your
Delphi app and you don't have to start Outlook first.
For details, see the example included in the zip-file.
LVL 10

Expert Comment

ID: 1352471
To start a default e-mailer you use this...

ShellExecute(0, 'open', '', nil, nil, SW_SHOWNORMAL);

I think that if you use this following
ShellExecute(0, 'open', '', 'Your Subject', nil, SW_SHOWNORMAL);
you can include your subject for the maill...

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 1352472
Your answer is correct but while trying to implement it, Delphi couldn't find the shell32.lib. Meanwhile I've got an answer from Tulip which seems more prefarable. Thanks anyway for answering my question.
LVL 10

Expert Comment

ID: 1352473
It couldn't find it because you didn't include it... I'm sorry for forgetting to tell you that you need to include it...

uses ...., ShellAPI;

as you can see you need to add ShellAPI to your uses clause... Hope this helps...


Author Comment

ID: 1352474
Thanks, it's completely correct, I was looking for shell32.lib and couldn't find it. I guessed already that it should be something like you mentioned. Thanks.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question