Skip to main content
BrianAdobeIdentification
Participant
July 27, 2018
Question

How do I email PDF file location to co-workers

  • July 27, 2018
  • 3 replies
  • 1513 views

Hi Everyone,

Our form requires about 5 different people to look at it, one after the other.  I set up a button for each person to press, once they sign it, to email a copy of the form along to the next person.

Rather than sending a copy of the form via email, I'd like to have the button email the PDF file's location to the next person in line.  We all have a shared network so no problem regarding that.  I'm just not sure what I need to write in order to get this done!

Any suggestions would be a appreciated!

This topic has been closed for replies.

3 replies

Legend
July 30, 2018

The path is returned in document.path but it is not in the same format; you’d need to transform it carefully.

Legend
July 29, 2018

If you go to File > Properties you can see the file location half way down the Summary section. Add the file name to that, and you have something you can email, unless it has a drive letter.

BrianAdobeIdentification
Participant
July 30, 2018

Yes I understand that, I'm trying to get javascript suggestions so my coworkers press a button and the location is already in the email that pops up once the button is pressed.

Thom Parker
Community Expert
Community Expert
August 1, 2018

You can covert the path to the current document into a platform path (i.e. a path that can be used on the particular system) with this code

Collab.convertDIPathToPlatformPath(this.path);

This function can be used with the app.mailMsg() function to build an email mail with a local network link to the document.

something as simple as this will work as a button script.

app.mailMsg({bUI:true,cTo:cTargetEmail, cSubject:"Form to fill out", cMsg:Collab.convertDIPathToPlatformPath(this.path)});

the cTargetEmail variable is a placeholder for the email of the next person who needs the form.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Thom Parker
Community Expert
Community Expert
July 27, 2018

There is a JavaScript function for just sending an email. Use this to send the link.

app.mailMsg();

Look it up here:

Acrobat DC SDK Documentation

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
July 28, 2018

Is the problem that you don't know how to write a network location (like \\groupserver\sharename\directory\file.pdf?) or something else?

BrianAdobeIdentification
Participant
July 29, 2018

Yes, I'm struggling with writing the network location. 

My idea was for my coworkers press a button, the email prompt pops up with the file pathway in it and they click the send button on the email prompt.

I have it currently set up to have them press a button, and email prompt pops up with the PDF as an attachment, and they click the send button on the email prompt.

With the current setup, it has copies of the file sent everywhere, I want everyone to get links to the original to take notes upon and sign.