View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default Creating "Plain Text" mail message in Outlook from Excel VBA

Hi Shane,

Try this line before the .Display line:

.BodyFormat = olFormatPlain

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Shane wrote:
Hi,
I'm trying to streamline the sending of e-mails by Microsoft Outlook
using VBA from Excel.

My problem is that the code below (taken from www.rondebruin.nl)
creates an "Rich Text Format" email, whereas I need the message in
"Plain Text".

Can anyone help?

Thanks

Shane


Sub Mail()
Dim olApp As Outlook.Application
Dim olMail As MailItem
Application.ScreenUpdating = False
Set olApp = New Outlook.Application


Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = "
.Body = "Hello"
.Display
End With
Set olMail = Nothing

Set olApp = Nothing
Application.ScreenUpdating = True
End Sub