Microsoft KB Archive/262821

= PRB: BodyPart.FileName Can't Handle BIDI or Single-Byte Japanese Characters =

Article ID: 262821

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Collaboration Data Objects 2.0

-



This article was previously published under Q262821



SYMPTOMS
The FileName property of the BodyPart object does not handle strings that contain bidirectional (BIDI) language (Hebrew and Arabic) or single-byte Japanese characters.



RESOLUTION
To get a file name that contains Hebrew, Arabic, or single-byte Japanese characters, use the GetFieldParameter method of the BodyPart object.



MORE INFORMATION
To get the file name of an attachment, you could use the following code: ' This code assumes that objMsg is a valid Message object with attachments.

Set iBodyPart = objMsg.Attachments(1) FileName =iBodyPart.GetFieldParameter(&quot;urn:schemas:mailheader:content-type&quot;,&quot;filename&quot;)

' The following two lines of code fail to obtain the attachment's file name.

' FileName = iBodyPart.Filename ' FileName = iBodyPart.Fields(cdoAttachmentFilename)

Additional query words: CDOEX &quot;CDO 2.0&quot;

Keywords: kbbug kbmsg kbprb KB262821

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.