Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

start outlook from within my application

How can I startup Outlook from within my delphi3 application, for example to send a message?
0
dummyy
Asked:
dummyy
  • 3
  • 2
1 Solution
 
viktornetCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now