Javascript toolbar button to email with filename as subject

New Here ,
Nov 15, 2018

Copy link to clipboard

Copied

Anyone have a javascript code that will attach an email as normal (via the email button) and add the subject line as the filename?  I would like this to be a button on the toolbar.  I'm using acrobat 9.  Thanks!

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Find the application's JavaScripts folder (probably something like: C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Javascripts), create a .js file in it, and place the following code in that file:

app.addToolButton({ cName: "CustomSendEmail", cLabel: "Attach to Email", cTooltext: "Attach to Email",

    cExec: "this.mailDoc({cSubject: this.documentFileName});", cEnable: "event.rc = (event.target != null);"});

Restart the application and the button should appear in your toolbar.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

143

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Javascript toolbar button to email with filename as subject

New Here ,
Nov 15, 2018

Copy link to clipboard

Copied

Anyone have a javascript code that will attach an email as normal (via the email button) and add the subject line as the filename?  I would like this to be a button on the toolbar.  I'm using acrobat 9.  Thanks!

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Find the application's JavaScripts folder (probably something like: C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Javascripts), create a .js file in it, and place the following code in that file:

app.addToolButton({ cName: "CustomSendEmail", cLabel: "Attach to Email", cTooltext: "Attach to Email",

    cExec: "this.mailDoc({cSubject: this.documentFileName});", cEnable: "event.rc = (event.target != null);"});

Restart the application and the button should appear in your toolbar.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

144

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 15, 2018 0
Most Valuable Participant ,
Nov 15, 2018

Copy link to clipboard

Copied

Find the application's JavaScripts folder (probably something like: C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Javascripts), create a .js file in it, and place the following code in that file:

app.addToolButton({ cName: "CustomSendEmail", cLabel: "Attach to Email", cTooltext: "Attach to Email",

    cExec: "this.mailDoc({cSubject: this.documentFileName});", cEnable: "event.rc = (event.target != null);"});

Restart the application and the button should appear in your toolbar.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2018 2
vwalla LATEST
New Here ,
Nov 15, 2018

Copy link to clipboard

Copied

YES!  Thank you!  Worked perfect!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2018 0