Skip to main content
Known Participant
May 18, 2010
Question

Links to external files don't work

  • May 18, 2010
  • 1 reply
  • 5056 views

Hello

Using RH 8.02 and converting linked Word docs (Word 2002) to WebHelp. These are policies and procedures that reference external documents.

In my Word doc I have a hyperlink to an external document. This doc is on a network server. In Word I added the hyperlink and it appeared as a relative path, such as ../RelatedDocs/RelDoc1.doc.

The referenced file is an external file, and I don't want to add it to RH because it may be updated; I just want to link to it so that a user gets the latest version.

When I update the HTML files in RH I see this in my HTML file:

<a href="file:////terminus/avbase_techsupport/av-base documents/supportmaster/documentationshare/relateddocs/reldoc1.doc">Related Doc 1</a>

This is the correct absolute path for the referenced file. Note the file://// prefix, with four forward slashes.

When I generate WebHelp, the link doesn't work. Nothing happens.

I tried the following:

1. Copied the whole path into my Windows Start > Run box and hit Enter. Nothing happens.

2. Removed two of the forward slashes and copied it again into the Run box. Now the file opens in Word.

I also tried removing the hyperlinks from the Word docs and adding them through RH instead. Same result.

Why does RH add four forward slashes to the prefix? What can I do to get these external links working?

Thanks for your help.

Roger Shuttleworth

London, Canada

This topic has been closed for replies.

1 reply

Peter Grainge
Community Expert
Community Expert
May 19, 2010

You are saying when you add the relative path from the topic where it is on the server to where the document is located, RoboHelp is amending it?

How are you entering the link?


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
shuttie27Author
Known Participant
May 20, 2010

Hello Peter

I apologize for taking so long to respond. I just received a new computer with Vista and have had to set it up. Here is what happens:

1. In Word, I have a doc policy1.doc that contains a hyperlink to reldoc1.doc. The two files are in different folders. When I insert the link, Word shows it as a relative path ../RelatedDocs/reldoc1.doc. When I hover over it in the Word doc, it shows as an absolute path starting with file:///\\theserver, etc.

2. My RH project includes policy1.doc but not reldoc1.doc. I update policy1.doc in RH. In the HTML topic file (HTML view) the link is:

<a href="file:////theserver/path/reldoc1.doc">Link text</a>. Note the four forward slashes.

3. I save all project files and generate WebHelp.

4. In the resultant web page (in Firefox), I click the link in policy1 and nothing happens. The status bar shows the path the same as above.

5. I navigate to the output !SSL! and find the index page, and open it in Internet Explorer 8. The link shows in the status bar as file://theserver/path/reldoc1.doc, and when clicked IE opens the Word doc.

So in this case Firefox doesn't open the link but IE does.

Here is another scenario:

1. I have no links in myWord docs.

2. I generate topic files in RH using the linked Word docs.

3. In RH, in the HTML file for policy1 (policy1.htm) I add a link to reldoc1.doc. I choose the file protocol. RH asks me if I want to copy the doc into the project folder, and I say No.

4. I check the HTML for policy1.htm and see that it has the link as follows:

<a href="file://J:/Documents/rest of folder path/RelDoc1.doc">Related Doc 1</a>

(Going to Hyperlink Properties shows the same path.) Note the two forward slashes.

5. I save all files in the project and click Generate Primary Layout (which is WebHelp). A dialog asks if I want to update <some file or other, but I can't see which one because that darned dialog box is too small, but I expect it's policy1.htm>.

6. I say No. The output is generated and I view it in Firefox. The link works and has a path in the status bar as:

<a href="file://J:/Documents/rest of folder path/RelDoc1.doc">Related Doc 1</a>
Note the three forward slashes.

7. I view the index.htm file in IE and it works.

As a variant of the above, instead of saying No when asked if I want to update the file, I say Yes.

1.The HTML of policy1.htm now shows the link as:

<a href="file:////server/rest of path/reldoc1.doc">Related Doc 1</a>

Note the four forward slashes again.

2. The link is as shown in the status bar of Firefox is now set to:

<a href="file:////server/rest of path/reldoc1.doc">Related Doc 1</a>
It doesn't work.

2. The same link shown in IE status bar has two forward slashes (even though the source has four), and it works.

So in answer to your question, the link definitely changes within RH. The two browsers deal with things differently, with IE seeing a file://// link as file://.

Incidentally, I did some research on the file:// protocol and came up with:

http://kb.mozillazine.org/Firefox_:_Issues_:_Links_to_Local_Pages_Don%27t_Work

The answer seems to be:

1. Add the links within RH.

2. Don't update when generating output.

3. If possible, get users to use IE instead of FF.

Either way, it's not very satisfactory for my purposes.

Regards,

Roger

Peter Grainge
Community Expert
Community Expert
May 21, 2010

The workflow is clearer to me now but I think I will have to set something up to see this live.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge


This is the test I set up.

On the D drive (a partition) I created two folders, each with a Word document. Doc 1 has a link to Doc 2

Hovering over the link is as below except for Z read D (I moved things)

In RH after linking and generating the topic, that gives me

Then I generate webhelp.

In FF the link is working fine except when you click it you lose the TOC.

If I choose to open it, it does open.

Clicking Refresh brings back the TOC. Not ideal but let's worry about that later.

Works OK in IE with no TOC problem.

I had the RH project on an external hard disk which I regularly use for RH projects. That's the nearest I can get to your scenario until I am back in the office Monday.

Create two new docs and a new RH project and copy the above as closely as you can. I want to see if it works the same for you or if you get a different result with a clean project and clean docs.

I was using Word 2007 and it's possible that does make things different.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.