Help: Setting the format of an email through code

  • Thread starter Thread starter ALS
  • Start date Start date
A

ALS

I am having some difficulty setting an email format to 'Plain Text' using
code.

I am trying to create an email inside an Access database that needs to have
fixed column widths of data inserted into the body of an email. I have no
trouble Inserting the data with the correct amount characters in each column
except the email format keeps coming out as HTML (Word is my email editor)
and not Plain Text thus different individual character widths are mucking up
my column alignment.

I know I could just go and change the default for all emails in Outlook to
Plain Text but this is not ideal as it is for a client.

I have found code which can return the format
(myItem.GetInspector.EditorType) but nothing that can set it.

Can anyone help?

Andrew Selby
Brisbane Australia

PS I am using both Outlook and Access XP
 
Set the MailItem.BodyFormat property to olFormatPlain (= 1) after you create
the message but before you set the Body property.
 
MailItem.BodyFormat was introduced in Outlook 2002.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers





Try http://www.outlookcode.com/d/code/zaphtml.htm
(not that i could find anything about (or even the existence of) the
bodyformat property using Outlook's VB reference!).
HTH, Martin
 
Back
Top