Search This Blog

Tuesday, November 1, 2016

ExtendScript - the New Frontier to Tame

I am using the “link Word documents” functionality within RoboHelp 2015.

My issue is my hyperlink in the Word doc is converted from a relative path to an absolute path.

You see, I have a Word doc in this folder – S:\Dir1\Dir2\Xlec.docx. Inside that file, there is a link to Xlec.pdf. I was trying to make it that a link in the Word doc will open the PDF after I compile my RoboHelp project and distribute browser-based Help. What happens now is the hyperlink is converted to an absolute path and I need it to be a relative path.

The workflow would be
  1. Add a link to the PDF in the Word doc
  2. Link to the Word doc in RoboHelp
  3. The Word document is updated.
  4. I see the little icon that says the Word doc has been updated in RoboHelp.
  5. I copy the PDF to my RH project directory
  6. I recompile my output. When I access the topic that RoboHelp created for the Word doc, the link opens the PDF.

However, what I’ve learned is that when RoboHelp creates the HTML page for the Word doc, it uses an absolute link, not a relative link.

It’s been suggested that a workaround is to write a script in ExtendScript to run whenever I import from Word or update a linked file and go through the topics automatically and change the now absolute link into a relative link.

Currently, I'm on the hunt for an existing ExtendScript that does this. Thus far, I'm not having a lot of success.

No comments: