Export (0) Print
Expand All

3 Algorithm Examples

In the following example, a simple HTML message is sent to a server.

From: <user1@example.com>
To: <user2@example.com>
Subject: test HTML message
Date: Tue, 24 Jan 2006 01:58:57 -0800
MIME-Version: 1.0
Content-Type: text/html
Content-Transfer-Encoding: 7bit
Content-Class: urn:content-classes:message
Importance: normal

<HTML><BODY>Test message, <b>please</b> delete.</BODY></HTML>

The four property values of interest are returned from the server with the following values.

Property name

Value

PidTagBody ([MS-OXPROPS] section 2.609)

error, NotEnoughMemory

PidTagHtml ([MS-OXPROPS] section 2.722)

<HTML><HEAD><meta HTTP-equiv="Content-Type" content="text/HTML; charset=iso-8859-1"></HEAD><BODY>Test message, <b>please</b> delete.</BODY></HTML>

PidTagRtfCompressed ([MS-OXPROPS] section 2.930)

error, NotEnoughMemory

PidTagRtfInSync ([MS-OXPROPS] section 2.931)

FALSE

The best body algorithm, as specified in section 2.1.3.1, creates the four variables shown in the following table.

Variable

Value

PlainStatus

NotEnoughMemory

RtfStatus

NotEnoughMemory

HtmlStatus

NoError

RtfInSync

FALSE

The best body algorithm uses the four newly created variables and matches clause 7, as specified in section 2.1.3.1.

Code to implement

7

ElseIf ((RtfStatus = NoError or RtfStatus = NotEnoughMemory) And
    (HtmlStatus = NoError or HtmlStatus = NotEnoughMemory) And
    (RtfInSync = False)) Then
        BodyFormat = Html

And the result returned is HTML body format.

Show:
© 2015 Microsoft