Skip to main content
Participant
July 25, 2018
Question

ExtendScript: Import HTML File returns false

  • July 25, 2018
  • 1 reply
  • 388 views

Hey,

I am new in using ExtendScript. I have to convert an old documentaion to RoboHelp and i wanted to use scripts for that. But acutally i am stucking at import a HTML file. I use the method Project.importHtmlFile (see my code below) and the script throws no error. But the file will not imported in the project and the method returns false (see my console output below).

Has anyone an idea, what i am doing wrong? Or is there a way to get more informaiton about the fail?

Script

var project = RoboHelp.getCurrentProject();

var result = project.importHtmlFile ("C:\Users\kgr\Desktop\RoboHelpTest\Zweites_Thema.html", "Test");

$.writeln("Import Result: " + result);

currentProject.saveAll (true);

Output

Import Result: false

Result: true

Project

This topic has been closed for replies.

1 reply

Community Expert
July 26, 2018

Maybe import the file manually and see if that's successful. If it doesn't import, the log might show you what's going wrong so you can fix it in your script.

And have a look at the sample scripts Adobe provides. There's one called Master Page Import.jsx that might help.

(By the way, most of us aren't coders here, so we probably can't give you much help script-wise.)