Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Add link to external file


i want to add a link to an external file in my document.

like "-a href=file://local path ... in html.


0 Replies


Level 10
You can use the command:

app.launchURL("", true)

where the second parameter is a boolean that says whether to launch the URL in a new window or not. The default is false.

Hope that helps
Thx Paul,

but I don't want to open a http URL, I want to open a doc file that is located on a public folder or on my local disk.

app.launchURL("file://c:/temp/t.txt", true);

does not work.




Level 10
I tried it here and found that it gave a security error. I do not think that the launchURL command allows you to get to a file on file system.

You could try certifying the document.
I had the same security problem.

But if I thing of importing an Word-doc that includes hyperlinks to files, how would this work?

Isn't it quiet common to include hyperlinks to files and not only to the web into forms?


Level 10
If you import a word file into designer then those links would be ignored. If you create a PDF from the word file (in Acrobat) then the links would be maintained.

but the feature which enables me to open a file via a hyperlink is not provided in the LC Designer?


Level 10
That is why we cannot support them when we import the word file.


Level 7
You would need to do your forms in Acrobat to have such features.

Aandi Inston
Adobe does have a secruity feature built in that keeps you from opening files or folders on the file system, but there is a way around this. First on your form you would put something like this on the click event of a button for your link:

var myPath = "o|/Network Folder/FileName";


Next you need to set up a JavaScript file that you will save as a trusted function for Reader. This js file should have the following code:

openNetworkFolder = app.trustedFunction(function (sURL) {


try {

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

} catch (err) {

app.alert('Error: ' + err);




This js file will need to be saved on each users local machine in their javascripts folder for reader. Also if you are pointing to a shared network folder, each user will need to have the same drive mapped for this to work properly for each user. This workaround allows you to bypass the built in Adobe security without having to sign the document.