Returns the object corresponding to the attachment identified by the specified name.
Syntax: |
DlxFolder.GetAttachment(name)
|
Parameters
Parameter |
Description |
name |
The attachment name. |
Return Value
Returns the object corresponding to the attachment. Call the IsValid() method to determine if the object is valid.
Example
|
Copy code
|
var folder = DlxApp.GetJob().GetFolder("folder1");
if (folder.IsValid())
{
var attachment = folder.GetAttachment("img.png");
}
if ((!attachment) || (!attachment.IsValid()))
throw new Error("Attachment not found.");
DlxApp.Printf("Attachment found.");
|
See also