calling the outlook application

Dear Experts,
I'm building application with Delphi 6 and on SQl Server2000 database
Now, I'm trying to send an email with attachment from my program by calling outlook application,
outlook := CreateOLEObject('outlook.application');
        try
                item := outlook.CreateItem(0);
                item.Subject := Subject;
                item.Body := Body;
                item.Attachments.Add(FileName,1,1,FileName);
                item.To  := '';
                item.open; ---------  this is not working
             //   item.Send; ---- this works fine when I pass it a correct email address
My problem is that I want the outlook to be opened with subject, body, attachment  (as parameters passed to that function) but the user has to choose the email-list from the outlook contacts
I don't now how to open the outlook instead of automatically sending the email
Help me please
Amanda77Asked:
Who is Participating?
 
Chris BottomleyConnect With a Mentor Commented:
Instead of:

item.Send
use
item.display

Chris
0
 
Amanda77Author Commented:
thanks alot
it works beautifully
0
 
Chris BottomleyCommented:
Glad it worked ok in Delphi ... it's standard syntax for VBA and since everything else in your code seemed to conform I thought this would as well.

Chris
0
All Courses

From novice to tech pro — start learning today.