Skip to main content
Participant
Sep 12, 2016 11:38 AM UTC
Answered

CREATE HYPERLINK TO AN EMAIL ADDRESS FROM A BUTTON

I need your help please.

I have created a 'Email us'  button on my PDF.  When people click on this I want them to be redirected to their email with my email address already in the 'To' area.

I am using the latest Acrobat DC Pro version (free trial) and there is no option to create an email link.  I do not want to write my full email address on the page as I want them to simply click the 'Email us' button.

Can you help with this please?

Many thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.
Karl Heinz  Kremer
Karl Heinz KremerCorrect answer
Community Expert
Sep 12, 2016 12:36 PM UTC

Add a button to your document and select to execute a "Run a JavaScript" action and use the Doc.mailDoc() method. You can find out more about this method in the API documentation: Acrobat DC SDK Documentation - Doc.mailDoc()

Chances are that something like this (modified version of the code in the documentation) will work:

this.mailDoc({

    cTo: "apstory@example.com",

    cCc: "dpsmith@example.com",
    cSubject: "The Latest News",

    cMsg: "A.P., attached is my latest news story in PDF."

  });

3 replies

Karl Heinz  Kremer
Community Expert
Karl Heinz KremerCommunity ExpertCorrect answer
Community Expert
Sep 12, 2016 12:36 PM UTC

Add a button to your document and select to execute a "Run a JavaScript" action and use the Doc.mailDoc() method. You can find out more about this method in the API documentation: Acrobat DC SDK Documentation - Doc.mailDoc()

Chances are that something like this (modified version of the code in the documentation) will work:

this.mailDoc({

    cTo: "apstory@example.com",

    cCc: "dpsmith@example.com",
    cSubject: "The Latest News",

    cMsg: "A.P., attached is my latest news story in PDF."

  });

Translate
try67
Community Expert
Community Expert
Sep 12, 2016 1:38 PM UTC

The name of the second parameter should be "cCc"...

Translate
Karl Heinz  Kremer
Community Expert
Community Expert
Sep 12, 2016 5:45 PM UTC

Thanks for proof reading I should know by now to not trust the samples in the API documentation...

Translate