Skip to main content
BrianAdobeIdentification
Participant
Jul 27, 2018 4:05 PM UTC
Question

How do I email PDF file location to co-workers

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 is closed to new replies. Start a new post to keep the conversation going.

11 replies

Legend
Jul 30, 2018 8:06 AM UTC

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

Translate
Legend
Jul 29, 2018 4:55 PM UTC

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.

Translate
BrianAdobeIdentification
Participant
Jul 30, 2018 12:53 AM UTC

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.

Translate
Thom Parker
Community Expert
Community Expert
Aug 1, 2018 3:46 PM UTC

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.

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Thom Parker
Community Expert
Community Expert
Jul 27, 2018 5:26 PM UTC

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

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
Jul 28, 2018 2:20 PM UTC

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

Translate
BrianAdobeIdentification
Participant
Jul 29, 2018 4:51 PM UTC

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.

Translate