Añade un objeto Attachment a la recopilación.
Este método crea un nuevo objeto Attachment para el archivo y añade el objeto al final de la recopilación. Puede recuperar elementos de la recopilación utilizando el método Item.
VBScript
attachments.Add filename, description
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 If Not theAttachments.Add("c:\attach1.txt", "Defect description") Then OutputDebugString "Error adding attachment to record." End If