Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outlook mailitem always sends as richtext!

Status
Not open for further replies.

marcdoyle

Technical User
Dec 18, 2002
95
GB
Despite all the settings in Outlook 2000 being set to send e-mails in plain text format, when an Outlook mailitem object sends an e-mail using message.send, it changes to richtext format. vb.net allows a message.bodyformat = olformatplain command to be used, but this isn't available in VB6. Is there an alternative?

Thanks in advance

Marc
 
no one? If you want/need more information, please let me know.
 
I've never had that problem with VB6/OL2000; it always creates an e-mail in the format specified under Tools | Options | Mail Format, "Send in this message format". Post your code so we can see how you are creating the e-mail.

>>vb.net allows a message.bodyformat<<

That isn't part of the Outlook object model which makes me suspect you are using a MAPI or some other control and not coding directly against the Outlook object model.


Paul Bent
Northwind IT Systems
 
ok, this is what i have. The actual program with the problem isn't mine but it has more or less the same code, it's just different in that it creates a new mailitem every time instead of when needed, has different data going into the e-mail, and uses message.send instead of message.display


general declarations:

Public OUTAPP As New outlook.Application
Public MESSAGE As outlook.MailItem


form code:

Private Sub createmail()
On Error GoTo continue
MESSAGE.To = tovar
MESSAGE.CC = ccvar
MESSAGE.BCC = bccvar
MESSAGE.Display
Exit Sub
continue:
createnewmail


End Sub


Private Sub createnewmail()
Err.Clear

Set MESSAGE = OUTAPP.CreateItem(olMailItem)
MESSAGE.To = &quot;&quot;
MESSAGE.CC = &quot;&quot;
MESSAGE.BCC = &quot;&quot;
MESSAGE.Subject = &quot;&quot;
createmail
End Sub
 
I can't see anything in the code that would cause the problem. I wonder if it's a service pack issue, I'm running Office 2000 SR-1. Don't go to SR-2 unless you want the dreaded Outlook Object Model Guard because it includes the security patch.

Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top