Skip to main content
Participating Frequently
October 9, 2018
Answered

How to "add attachment" using acrobat dc

  • October 9, 2018
  • 1 reply
  • 2070 views

I am creating a form for the company.

It contains the submit button which would submit the form to me via email after flattening it. The flatten javascript is contained in the submit button as well.

I need to include a "add attachment" or "browse file" button in it for the associates of the company to attach file which is to be viewed by the recipient.

The question is, how do I create a button for attachment like this? I tried few javascript but it only enables us to browse the file but the recipient could not see the attached file.

Thanks in advance.

This topic has been closed for replies.
Correct answer try67

it is preffered that the form has a button to upload the file.

May i know how do i do this?


You can use something like this as the button's MouseUp script:

var annot = this.addAnnot({

    page: 0,

    type: "FileAttachment",

    point: [100,100],

    attachIcon: "PushPin",

    contents: "Attachment"

});

annot.cAttachmentPath;

It will only work correctly in Reader 11 or higher, though.

1 reply

try67
Community Expert
Community Expert
October 9, 2018

Is the file being used in Acrobat or in Reader?

vieveAuthor
Participating Frequently
October 9, 2018

the file? As in the attachment or the form itself?

the e-form itself would be distributed to associates which are likely to have Reader as their software.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 9, 2018

it is preffered that the form has a button to upload the file.

May i know how do i do this?


You can use something like this as the button's MouseUp script:

var annot = this.addAnnot({

    page: 0,

    type: "FileAttachment",

    point: [100,100],

    attachIcon: "PushPin",

    contents: "Attachment"

});

annot.cAttachmentPath;

It will only work correctly in Reader 11 or higher, though.