 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Kim S Guest
|
Posted: Thu Aug 25, 2005 8:09 am Post subject: How to open Outlook New mail message.. |
|
|
...with preset Subject and Body? I'm new to Ole Auto and cannot find a
way to simply have my app launch an Outlook New Mail Message. Can anyone
point me in the right direction?
Regards, Kim
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Thu Aug 25, 2005 9:23 am Post subject: Re: How to open Outlook New mail message.. |
|
|
Hi,
see the samples:
1. to create the message using mailto: and OLE automation (for MS Outlook)
http://www.scalabium.com/faq/dct0049.htm
2. to create the message using MAPI
http://www.scalabium.com/faq/dct0115.htm
--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com
"Kim S" <ks (AT) pumpkin-post (DOT) dk> wrote
| Quote: | ..with preset Subject and Body? I'm new to Ole Auto and cannot find a
way to simply have my app launch an Outlook New Mail Message. Can anyone
point me in the right direction?
Regards, Kim
|
|
|
| Back to top |
|
 |
Kim S Guest
|
Posted: Thu Aug 25, 2005 9:42 am Post subject: Re: How to open Outlook New mail message.. |
|
|
Mike Shkolnik wrote:
However, I want to OPEN the New Mail Message so the user can modify it
before sending it. The procedure above just sends the message (after the
annoying sequrity warning by the way - how do I get rid of that?).
Regards, Kim
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Thu Aug 25, 2005 11:16 am Post subject: Re: How to open Outlook New mail message.. |
|
|
Just call the Display method instead Send:
const
olMailItem = 0;
var
Outlook, MailItem: OLEVariant;
begin
Outlook := CreateOleObject('Outlook.Application');
MailItem := Outlook.CreateItem(olMailItem);
MailItem.Recipients.Add('mshkolnik (AT) scalabium (DOT) com');
MailItem.Subject := 'your subject';
MailItem.Body := 'Welcome to my homepage: http://www.scalabium.com';
MailItem.Attachments.Add('C:WindowsWin.ini');
MailItem.Display;
Outlook := Unassigned;
end;
-- With best regards, Mike ShkolnikEMail:
[email]mshkolnik (AT) scalabium (DOT) comhttp://www.scalabium.com[/email]"Kim S" <ks (AT) pumpkin-post (DOT) dk>
wrote in message news:430d925a$3 (AT) newsgroups (DOT) borland.com...
| Quote: | Mike Shkolnik wrote:
Hi,
see the samples:
1. to create the message using mailto: and OLE automation (for MS
Outlook)
http://www.scalabium.com/faq/dct0049.htm
Thanks Mike, again!
However, I want to OPEN the New Mail Message so the user can modify it
before sending it. The procedure above just sends the message (after the
annoying sequrity warning by the way - how do I get rid of that?).
Regards, Kim
|
|
|
| Back to top |
|
 |
Kim S Guest
|
Posted: Thu Aug 25, 2005 11:26 am Post subject: Re: How to open Outlook New mail message.. |
|
|
Mike Shkolnik wrote:
| Quote: | Just call the Display method instead Send:
MailItem.Display;
Perfect, just what I wanted! |
I had been trying all sorts like Show, Open a.o. without luck. Is there
somewhere I can see available parameters?
Cheers, Kim
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Thu Aug 25, 2005 3:49 pm Post subject: Re: How to open Outlook New mail message.. |
|
|
| Quote: | Is there somewhere I can see available parameters?
Use the help file for VBA in Outlook or any COM/TypeLibrary Viewer |
--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|