FIX: CDO (1.21) Message.Text Property May Return Truncated (192910)



The information in this article applies to:

  • Collaboration Data Objects (CDO) 1.21

This article was previously published under Q192910

SYMPTOMS

If a Collaboration Data Objects (CDO 1.21) 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 (1.21):

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 (1.21) 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, click the following article number to view the article in the Microsoft Knowledge Base:

191014 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 1.21)

   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 that this is a problem in Collaboration Data Objects version 1.21. This problem was first corrected in Exchange Server 5.5 Service Pack 3.

Modification Type:MinorLast Reviewed:9/23/2005
Keywords:kbHotfixServer kbQFE EXC55SP3Fix kbbug kbfix kbMsg KB192910