Attachment 오브젝트를 콜렉션에 추가합니다.
이 메소드는 파일의 새 Attachment 오브젝트를 작성한 후 오브젝트를 콜렉션에 끝에 추가합니다. 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