Solved

start outlook from within my application

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

Accepted Solution

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

-Viktor
--Ivanov
0
 

Expert Comment

by:Tulip
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.

http://www.torry.ru/vcl/internet/temail2.zip
0
 
LVL 10

Expert Comment

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

ShellExecute(0, 'open', 'mailto:viktor@megsinet.net', nil, nil, SW_SHOWNORMAL);

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

-Viktor
--Ivanov
0
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

by:dummyy
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.
0
 
LVL 10

Expert Comment

by:viktornet
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...

Cheers,
Viktor
0
 

Author Comment

by:dummyy
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.
0

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. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

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