start outlook from within my application

How can I startup Outlook from within my delphi3 application, for example to send a message?
dummyyAsked:
Who is Participating?
 
viktornetConnect With a Mentor Commented:
ShellExecute(0, 'open', 'Outlook.exe', nil, nil, SW_SHOWNORMAL);

-Viktor
--Ivanov
0
 
TulipCommented:
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
 
viktornetCommented:
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
dummyyAuthor Commented:
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
 
viktornetCommented:
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
 
dummyyAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.