Framework EDI Reference. Methods and Properties
mailBody.Length

Gets the length of the body in decimal number of bytes (or octets).

Syntax:

Remarks:

This property returns the total number of bytes (or octets) in the message body.  Because the data is stored as binary, special characters are counted even if the message has been defined as text.

Please note:

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oSubMsg As Fredi.mailMessage
Dim oBody As Fredi.mailBody

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

' Load EDI document normally.
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get subject message
Set oSubMsg = oMailDocument.GetMessage

' Get subject message body
Set oBody = oSubMsg.GetBody

MsgBox "Length: " & oBody.Length

Samples