Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Sydney, Australia, New South Wales, Australia
    Thanked 4 Times in 4 Posts

    Controlling editor type from VBA (2000)

    I'm creating emails programmatically from VBA (actually from Access).
    I want the emails to be plain text, so I use code like this:
    <pre> Dim oOutl As Outlook.Application
    Dim oNS As Outlook.NameSpace
    Dim oMail As Outlook.MailItem

    Set oOutl = New Outlook.Application
    Set oNS = oOutl.GetNamespace("MAPI")
    oNS.Logon "MS Exchange Settings", , False
    Set oMail = oOutl.CreateItem(olMailItem)

    With oMail
    .Subject = strSubject
    .Body = strBody
    End With

    Problem is, this makes the message in the default editor for Outlook. Sometimes it's Plain text, sometimes Rich text. The editor can be discovered with item.GetInspector.EditorType
    But how do I change the editor that's creating the message?
    It can be done interactively with the message's menu Format, Plain Text.
    But I don't want to use send keys. <img src=/S/puke.gif border=0 alt=puke width=60 height=15>

    Thanks for your help <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Salt Lake City, Utah, USA
    Thanked 5 Times in 5 Posts

    Re: Controlling editor type from VBA (2000)

    Peter, I think you are stuck with RTF until you get to Outlook 2002. See OutlookCode ZapHTML, the section on Outlook 2000.
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts