Outlook: Need 2 options

Giganews Newsgroups
Subject: Outlook: Need 2 options
Posted by:  Brian Ellul (brianell…@ecenglish.nospan.com)
Date: Thu, 12 Jul 2007

I'm using the code below to send emails from within my application. I need
to add two more options;1) to ask for an email Acknowledgement on sending
the email.2) to first 'preview', the email in outlook with all details
filled in before sending.Code I'm using............const
  olMailItem = 0;
var
  Outlook, MailItem: OLEVariant;
begin
  try
    Outlook := GetActiveOleObject('Outlook.Application');
  except
    Outlook := CreateOleObject('Outlook.Application');
  end;

  MailItem := Outlook.CreateItem(olMailItem);
  MailItem.Recipients.Add(emailaddress);
  MailItem.Subject := '';
  MailItem.Body := '';
  MailItem.Attachments.Add(Filename);
  MailItem.Send;

  Outlook := Unassigned;
end;

Replies