Rather than using the TypeLib. Use the com. Object. As it exposes all
the properties and functions, where the typelib. Doesn't.

Jeremy

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Warren Slater (ASL)
Sent: Monday, 30 June 2003 14:49
To: Multiple recipients of list delphi
Subject: [DUG]: Creating a plaintext message using outlook


Hi
I have been trying to create an email message from within delphi where
the body is stored in plaintext format. By default outlook creates the
body in rtf format. I have tried setting the default email body format
in outlook but this does nothing for emails created from delphi. From
what I have found on the net there is a .BodyFormat property (using
access etc) you can set but delphi5 using the outlook8 library does not
know anything about it. I have tried editing a copy of the outlook8.pas
file to add the property but when compiling it says that the
DefaultInterface.BodyFormat property does not exist. Does anyone know
how to this?

my code is

    Outlook := CoOutlookApplication.Create;
    MI := Outlook.CreateItem(olMailItem) as MailItem;
    // MI.BodyFormat:=1;  <<<<<< WILL NOT WORK
    MI.Recipients.Add(Trim(ADOQuery1['VendEmail']));
    MI.Subject := 'Asl Purchase Order '+PONbr;
    MI.Attachments.Add('c:\order.html', EmptyParam, EmptyParam,
EmptyParam);
    MI.Body := sl.Text;
    MI.ReadReceiptRequested:=True;
    MI.Display(-1);
    Outlook:=Nil;

where sl is a stringlist

Thanks
Warren

########################################################################
#############
This e-mail message has been scanned for Viruses and Content and cleared

by MailMarshal
For more information please visit www.marshalsoftware.com
########################################################################
#############
------------------------------------------------------------------------
---
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to