Share via


MapiMessage.getFileNo Method

Gets a file attachment from a message.

Syntax

public MapiFileDesc getFileNo(int fileNo)

Run On

Called

Parameters

  • fileNo
    Type: int
    The index of the attachment to retrieve. The index starts at 1, and the total number of attachments can be retrieved using the numFiles method.

Return Value

Type: MapiFileDesc Class
Returns a MapiFileDesc object that contains information about the attachment.

Remarks

The attached file is returned in a MapiFileDesc object.

Examples

{ 
    MapiFileDesc attachment; 
    MapiMessage message; 
  
    // Retrieve message. 
    // ...  
 
    if (message.NumFiles() >= 1) 
    { 
        attachment = message.GetFileNo(1); 
    } 
}

See Also

MapiMessage Class

MapiFileDesc Class

MapiMessage.setFileNo Method