ContentLength Property  
 

Returns the size of the data stored in the selected message part.

Syntax

object.ContentLength

Remarks

The ContentLength property returns the size of the content in the current message part as the number of bytes and does not account for any Unicode conversion of text. Exercise caution when using this property to determine the size of a buffer that should be allocated for the message text. If you need to know the actual length of the decoded text in the current message part, use the TextLength property instead. It will return the number of characters (not bytes) in the message after it has been decoded and converted to Unicode.

This property is read-only, and is updated when the current message part changes.

Data Type

Integer (Int32)

See Also

ContentID Property, ContentType Property, Part Property, Text Property, TextLength Property