Skip to main content
Participant
April 17, 2024
Question

Attach completed PDF to email with filename derived from a cell value

  • April 17, 2024
  • 1 reply
  • 316 views

I have created a PDF Form template which is sent out to users to complete.

At the bottom of the PDF is a button "Attached and email completed Form".

 

Upon the user completing the PDF, I have a cell which shows a unique value derived from 3 combined cell values.   This cell value is used to create a QR code, but I also want this cell value to become the name of the PDF file that gets attached to the email.  So when the recipient receives the email, he sees the PDF with this unique name that was derived from those three combined cell values.

 

For example:

> Todays date + Part Origin + Article Number
>> 2024/04/17 + 123456 + 55555

>>> 202404171234565555.pdf (this is the name of the file that is attached to the email).

 

I have been able to generate this 3-cell value into a cell "FormID", but I am stuck on how to have this FormID be used in the file attachment process.

 

Your help is appreciated.

At this moment, the PDF is attached to the email with its current filename "DefectivePartReturn_v1.3.pdf"

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
April 17, 2024

You can only save a file under a specific name if the code is backed by a script file that's installed on the local machine of each user. Assuming that's not feasible in your case, the next best thing is to prompt the user to save the file under the desired name. You can even add a condition that will stop the file from being submitted if it doesn't have the correct name.

bingo2385Author
Participant
April 17, 2024

Thank you for the feedback.

In that case, I think I will do the file naming enforcing when I receive the completed PDFs back.

I guess I will just need to save the 'template' with a sensible filename in the meantime.