Skip to main content
Participant
May 8, 2019
Question

Use submit Botton to rename and email document

  • May 8, 2019
  • 2 replies
  • 422 views

I'm trying to automatically rename a file using fields from the document (date, clients name....) from an fillable pdf and then send it in an email. I have tried using Javascrpts but none of them have worked, it send the email but keeps the original file name. Is there a java script that will do both and would someone be willing to share it.

Thanks in advance.

Fred

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
May 8, 2019

As mentioned, JS can't actually rename a file, but it can save it under a new name before submitting it.

That requires installing a script on the local machine of each user, though.

See: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

fred_w2Author
Participant
May 8, 2019

Hello and thanks so far.

Let me explain a little better on what I am trying to achieve. I have created a form that will be used for a safety briefing by multiple users in multiple locations on the same day (using iPads). Once that form has been completed I would like all user to email it to email address without saving it on the iPad (iPads don't have enough storage). The way the email function works now is it maintains the same file name as the original file. So the person receiving the emails now has to rename every file before they can add to a folder. Are you not saving the file as an email attachment before it sends?

Can you confirm that this is not possible and I will look for different options.

Thanks for your time.

try67
Community Expert
Community Expert
May 8, 2019

On an iPad it's not possible.

Bernd Alheit
Community Expert
Community Expert
May 8, 2019

Acrobat Javascript can't change names of files. It can save a copy with a new name.