//DESCRIPTION:Export to FXL HTML // Export FXL HTML.jsx // // Modified 2015-07-29 // Keith Gilbert, Gilbert Consulting // www.gilbertconsulting.com // blog.gilbertconsulting.com // Main(); function Main() { // Check to see whether any InDesign documents are open. // If no documents are open, display an error message. if (app.documents.length > 0) { var myDoc = app.activeDocument; // Build the filename var myDocName = decodeURI(myDoc.fullName); var myDocBaseName = myDocName.substring(0, myDocName.lastIndexOf(".")); // Export the page to FXL HTML with (myDoc.htmlFXLExportPreferences) { epubPageRangeFormat = PageRangeFormat.EXPORT_ALL_PAGES // epubPageRangeFormat = PageRangeFormat.EXPORT_PAGE_RANGE // epubPageRange = "1-2"; } myDoc.exportFile(ExportFormat.HTMLFXL, new File(myDocBaseName + ".html"), true); } else { // No documents are open, so display an error message. alert("No InDesign documents are open. Please open a document and try again.") } }