Przejdź do głównej zawartości

ChangeAttachmentName

The ChangeAttachmentName() function changes the name of the attached file with the provided name to the new one.

ChangeAttachmentName(sourceFileName,newFileName);
  • sourceFileName – (String) a name of the attached file for which name is to be changed;
  • newFileName – (String) a new name for the attached file.

The ChangeAttachmentName() function returns Boolean. Returns true if change was successful, otherwise false.

This will change name of ’currentName’ to ’newName’.

ChangeAttachmentName("currentName","newName");

This will change name of attachment based on values stored in [currName] and [newName] variables.

ChangeAttachmentName([currName], [newName]);

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");