 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Byron Upchurch Guest
|
Posted: Wed May 16, 2007 3:37 am Post subject: Sending mail with Outlook 2007 |
|
|
How do I send e-mail using Outlook 2007? I am using D7, with the following
code works well with Outlook 2003 and prior versions:
procedure TForm1.Button1Click(Sender: TObject);
var
MSOutlook, MSItem: OLEVariant;
begin
MSOutlook := CreateOleObject( 'Outlook.Application' ); // in ComObj.pas
MSItem := MSOutlook.CreateItem(0);
MSItem.To := 'nobody (AT) noplace (DOT) com';
MSItem.Subject := 'hello';
MSItem.Body := 'Some message';
MSItem.Send;
end;
When I try this method with Outlook 2007, nothing happens. Any ideas what I
might be doing wrong?
Byron Upchurch |
|
| Back to top |
|
 |
Christian Wilkerson Guest
|
Posted: Wed May 16, 2007 4:15 am Post subject: Re: Sending mail with Outlook 2007 |
|
|
borland.public.delphi.oleautomation is a much better location for this
question.
--
Christian Wilkerson
CAUTION - Home made country music
@ http://www.myspace.com/christianwilkersonmusic
"Byron Upchurch" <byron (AT) iqms (DOT) com> wrote in message
news:464a35c0$1 (AT) newsgroups (DOT) borland.com...
| Quote: | How do I send e-mail using Outlook 2007? I am using D7, with the
following code works well with Outlook 2003 and prior versions:
procedure TForm1.Button1Click(Sender: TObject);
var
MSOutlook, MSItem: OLEVariant;
begin
MSOutlook := CreateOleObject( 'Outlook.Application' ); // in ComObj.pas
MSItem := MSOutlook.CreateItem(0);
MSItem.To := 'nobody (AT) noplace (DOT) com';
MSItem.Subject := 'hello';
MSItem.Body := 'Some message';
MSItem.Send;
end;
When I try this method with Outlook 2007, nothing happens. Any ideas what
I might be doing wrong?
Byron Upchurch
|
|
|
| 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
|
|