Avatar

Level 2

Finally figured this out using the work around located here: http://forums.adobe.com/message/1359940#1359940

I used the simplest form of this to get it to work.

You need to create a openFolder.js file in a text editor like notepad++ and then copy the text below into it:

var openFolder = app.trustedFunction(function (sURL)

{

          app.beginPriv();

                    var nDoc = app.launchURL("file:///" + sURL, true);

          app.endPriv();

});

You then save this file in the javascripts folder in either Acrobat or Reader.

You then create a TextField1 and a Button, within that buttons click event place the following javascript:

var myPath = TextField1.rawValue;

openFolder(myPath);

You should now be able to place a path in the text field and press the button to follow it. This only works for paths that have forward slashes in them (/). This means if you paste a path from windows you will need to manually convert the backslahes to forward slashes. Or you can do some string editing when you call the function to replace all \ with /.

This method also works with files.

You can add

var myPath = myPath.replace(/\134/g,"/");

to convert backslahes to forward slashes

Currently this will not handle paths with spaces in them... Does anybody have an idea on how to make it work with spaces?

Thanks!