Item Property
Returns attachment with the specified Index
from the Attachments collection of the message. If Index is out
of range, automation error occurs.
This is default property of the Attachments collection. The following
two statements (assuming Attachs has MailBee.Attachments type) are equivalent:
Set Attach = Attachs(1)
and
Set Attach = Attachs.Item(1)
Value Type: | MailBee.Attachment | |
Parameters: | ||
Index As Long | Index of the attachment to return. Allowed range is: 1 <= Index <= Attachments.Count | |
Remarks: | This property is read-only |
Usage example:
Dim Mailer, Msg 'Using visual basic to create object Set Mailer = CreateObject("MailBee.POP3") 'Using ASP to create object 'Set Mailer = Server.CreateObject("MailBee.POP3") 'In ASP use Response.Write instead of MsgBox Mailer.LicenseKey = "put your license key here" Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword" If Mailer.Connected Then If Mailer.MessageCount > 0 Then Set Msg = Mailer.RetrieveSingleMessage(1) If Msg.Attachments.Count > 0 Then MsgBox "Filename of the first attachment: " & Msg.Attachments(1).Filename End If End If Mailer.Disconnect End If
See Also:
Count
Property
Attachment Object
Attachments Collection
Message Object
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.