説明
コレクション内の指定されたアイテムを戻します。
このメソッドの引数は、数値インデックス (itemNum) または文字列 (name) のいずれでもかまいません。
構文
VBScript
collection.Item (itemNum)
collection.Item (name)
Perl
$collection->Item(itemNum);
$collection->ItemByName(name);
- 識別子
- 説明
- collection
- Attachments コレクション オブジェクト。レコードの 1 つのフィールドの添付ファイルのセットを表します。
- itemNum
- コレクションのインデックスとして機能する Long。このインデックスは 0 ベースなので、コレクション内の最初のアイテムは番号 0 であり、1 ではありません。
- name
- コレクション内のキーとして機能する String。この文字列は、該当する Attachment オブジェクトの値に対応します。
- 戻り値
- コレクション内の指定された位置の Attachment オブジェクト。
例
VBScript
' This example assumes there is at least 1 attachment field
' associated with the record.
set currentSession = GetSession
set attachFields = AttachmentFields
set attachField1 = attachFields.Item(0)
set theAttachments = attachField1.Attachments
firstAttachment = theAttachments.Item(0)