Jaa


MapiMessage.getFileNo(Int32) Method

Definition

Gets a file attachment from a message.

public:
 virtual Dynamics::AX::Application::MapiFileDesc ^ getFileNo(int _fileNo);
public virtual Dynamics.AX.Application.MapiFileDesc getFileNo (int _fileNo);
abstract member getFileNo : int -> Dynamics.AX.Application.MapiFileDesc
override this.getFileNo : int -> Dynamics.AX.Application.MapiFileDesc
Public Overridable Function getFileNo (_fileNo As Integer) As MapiFileDesc

Parameters

_fileNo
Int32

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.

Returns

Returns a MapiFileDesc object that contains information about the attachment.

Remarks

The attached file is returned in a MapiFileDesc object.

The following example demonstrates the getFileNo method.

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

Applies to