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



The information in this article applies to:

  • Microsoft Collaboration Data Objects for Windows 2000

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("urn:schemas:mailheader:content-type","filename")

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

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

Modification Type:MinorLast Reviewed:3/4/2004
Keywords:kbBug kbMsg kbprb KB262821