StartDownloadsServiceSamplesWorkshopsContact DeutschEnglish
Awarded by
Microsoft since 2005:
mvp logo
VBOffice Info
Privacy Policy
Contact: Edit the internet format
Author: Michael BauerHomepage
Date: 11.09.2006Accessed: 29996

A contact in Outlook might have up to three e-mail addresses, and for every one you can determine the format that Outlook should use for sending e-mails.

Since Outlook 2000 there're the settings: a) Let Outlook decide the best sending format, b) Send using Outlook Rich Text format.

Since Outlook XP there's a third option: c) Send Plain Text only.

The information, which format to use, is written in the EntryID of each address. Using the Outlook object model, that property is read-only. If you want to change it you must use CDO 1.21 or the Redemption.

This sample shows how to change the sending format for the first e-mail address (EMail1EntryID) by using the Redemption. If you want to change the format also for the second and third address, there're yet the necessary IDs (EMail2EntryID and EMail3EntryID), so that you're able to extend the sample yourself.

Private Const SEND_AUTO_FORMAT = 1
Private Const SEND_RTF_FORMAT = 0

Public Sub ChangeSendingFormat()
  On Error GoTo cleanUp
  Dim Session As Redemption.RDOSession
  Dim Utils As Redemption.MAPIUtils
  Dim obj As Redemption.rdoMail
  Dim Items As Redemption.RDOItems
  Dim AdrID As Variant
  Dim PropID As Long
  Const GUID As String = "{00062004-0000-0000-C000-000000000046}"
  ' Email1EntryID
  Const ID = &H8085
  ' Email2EntryID = &H8095
  ' Email3EntryID = &H80A5

  Set Session = CreateObject("Redemption.RDOSession")

  Set Items = Session.GetDefaultFolder(olFolderContacts).Items
  If Items.Count Then
    Set Utils = CreateObject("Redemption.MapiUtils")
    Set obj = Items(1)
    PropID = Utils.GetIDsFromNames(obj, GUID, ID)
    PropID = PropID Or &H102

    For Each obj In Items
      If TypeOf obj Is Redemption.RDOContactItem Then
        AdrID = Utils.HrGetOneProp(obj, PropID)
        If Not IsEmpty(AdrID) Then
          AdrID(22) = SEND_AUTO_FORMAT
          Utils.HrSetOneProp obj, PropID, AdrID, True
        End If
      End If
  End If

  If Not Session Is Nothing Then
  End If
End Sub

ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the ... [more]


Access the master category list in the blink of an eye, share your categories in a network, get a reminder service, and ... [more]


SAM automatically sets the sender, signature, and folder for sent items, for instance based on the recipient ... [more]


OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more]