Skip to main content
GeorgeCFray
Known Participant
October 2, 2018
Question

Producing Code that allows me to Save As with Consecutive Numbering to the PDF THEN Send In An Email

  • October 2, 2018
  • 1 reply
  • 764 views

Hi,

I'm looking to automate the name generation process within my PDF.

Essentially I wish to add a save as code the start of the below code. which reads the code within a folder, then saves as takes the next available number and opens it with the email code below

var theSubject = "ECR-X01 | " + this.getField("Dropdown3").value;

this.mailDoc({

  bUI: false,

  cTo: this.getField("Text Field 4").value,

  cCc: "sample@email.com",

  cSubject: theSubject,

  cMsg: "Hi, can you please review the attached Engineering Change Request? If you feel that this Engineering Change Request Form can be improved, please contact George Fray"

});

Thanks in advance.

(PS. the above code is working spot on!)

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 2, 2018

You would need to install a script on the local machine of each user to do it automatically.

Is that possible in your case? If so, read this tutorial: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

If not, what you can do is prompt the user to save the file using a specific name and not submit it until they do.

GeorgeCFray
Known Participant
October 2, 2018

Due to the way our system works. I'm afraid not they are not on local machines. I think the prompt would be the best option.