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

Javascript toolbar button to email with filename as subject

New Here ,
Nov 15, 2018 Nov 15, 2018

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
686
Translate
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.

Translate
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.

Translate
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
LATEST

YES!  Thank you!  Worked perfect!

Translate
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