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...

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline


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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now