ChangeAttachmentName
ChangeAttachmentName
Change name of attachment file with given name to the new name.
Syntax
ChangeAttachmentName("sourceFileName","newFileName");
Function arguments
- sourceFileName – (String) The name of attachment file for which name is to be changed.
- newFileName – (String) The new name for attachment file.
Return value
This function returns Boolean.
Returns true if change was successful, otherwise false
Examples
Example 1:
This will change name of 'currentName’ to 'newName’.
ChangeAttachmentName("currentName","newName");
Example 2:
This will change name of attachment based on values stored in [currName] and [newName] variables.
ChangeAttachmentName([currName], [newName]);
Example 3:
This will change name of 'doc_template.docx’ to 'ClientNameValue_info.docx’. (ClientNameValue is the value stored in [ClientName] variable.
ChangeAttachmentName("doc_template.docx",[ClientName]+"_info.docx");