BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sending mail with Outlook 2007

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OpenToolsAPI
View previous topic :: View next topic  
Author Message
Byron Upchurch
Guest





PostPosted: Wed May 16, 2007 3:37 am    Post subject: Sending mail with Outlook 2007 Reply with 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
Christian Wilkerson
Guest





PostPosted: Wed May 16, 2007 4:15 am    Post subject: Re: Sending mail with Outlook 2007 Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OpenToolsAPI All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.