@AttachmentLengths (Formula Language)

Returns a number or a number list containing the length of each attachment to the current document. The number(s) returned are only approximations; the actual size(s) of the attachment(s) may be slightly different.

Syntax

@AttachmentLengths( excludeMIMEBody )

Parameters

excludeMIMEBody

Boolean. Optional.

Return value

sizeInBytes

Number or number list.

Usage

The attachment size is computed based on uncompressed file size (that is, the number of bytes the attachment would use if you extracted it); the actual disk storage space required for the file may be somewhat smaller.

@AttachmentLengths returns an empty list if there are no attachments. If there is one attachment of length 0, @AttachmentLengths returns 0.

Examples

  1. This example returns 6102 if that is the approximate size of the single, attached file.
    @AttachmentLengths
  2. This example, given a semicolon as the multi-value separator, returns AUTOEXEC.BAt:112;CONFIG.SYS:1549;Q4SALES.WK4:17636 if those are the names and lengths of the files attached.
    @AttachmentNames + ":" + @Text(@AttachmentLengths)
  3. This example returns 0 if there is one attachment of length 0.
    @AttachmentLengths
  4. This example returns an empty list (no value appears at all) if there are no attachments.
    @AttachmentLengths
  5. This example sums the attachment lengths, checking first to make sure there are attachments.
    @Sum(@Attachments > 0; @AttachmentLengths; 0)

Language cross-reference

FileSize property in LotusScript® NotesEmbeddedObject class

FileSize property in Java™ EmbeddedObject class


Additional Documentation | Trademarks |