• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Javascript toolbar button to email with filename as subject

New Here ,
Nov 15, 2018 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!

TOPICS
Acrobat SDK and JavaScript , Windows

Views

486

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
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 15, 2018 Nov 15, 2018

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.

Votes

Translate

Translate
Community Expert ,
Nov 15, 2018 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.

Votes

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
community guidelines
New Here ,
Nov 15, 2018 Nov 15, 2018

Copy link to clipboard

Copied

LATEST

YES!  Thank you!  Worked perfect!

Votes

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
community guidelines