BUG: CDO Message.Text Property May Return Truncated

ID: Q192910


The information in this article applies to:
  • Collaboration Data Objects (CDO), version 1.21


SYMPTOMS

If a Collaboration Data Objects (CDO) application runs on a Chinese Traditional (CHT) or Chinese Simplified (CHS) Windows NT system, the Text property of the message may return truncated. For this to occur, the PR_BODY property of the message must be a Multi-Byte Character Set (MBCS) and contain a mix of American National Standards Institute (ANSI) and MBCS characters in the first 255 characters of the message.

The following sample Visual Basic code fragment shows how one might read the Text property of a message object using CDO:


Set sessionObj = CreateObject("MAPI.Session")
sessionObj.logon "TestUser", "TestUser", 0

Set InboxObj = sessionObj.Inbox
Set messageCol = InboxObj.Messages
Leng = messageCol.Count
Set messageFilter = messageCol.Filter
messageFilter.Unread = True

Set pMessage = messageCol.GetFirst
retv = pMessage.Text 

If the preceding conditions are met, when you display retv, it is truncated to the first 255 characters of the message.


CAUSE

A logic problem is preventing CDO from detecting that the Text property has been truncated.


RESOLUTION

To resolve this problem, obtain the latest service pack for Exchange Server version 5.5. For additional information, please see the following article in the Microsoft Knowledge Base:

Q191014 XGEN: How to Obtain the Latest Exchange Server 5.5 Service Pack
The English version of this fix should have the following file attributes or later:

Component: Collaboration Data Objects (CDO)


   Version      File name     
   ----------------------
   5.5.2540.0   Cdo.dll  


WORKAROUND

Adding the following line prior to retrieving the Text property as a work around to this problem:

n = pMessage.fields.count


STATUS

Microsoft has confirmed this to be a problem in Collaboration Data Objects version 1.21. This problem was first corrected in Exchange Server 5.5 Service Pack 3.

Additional query words:

Keywords : kbCDO121 kbCDO121bug EXC55SP3Fix
Version : WINDOWS:1.21
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: September 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.