Answered
My for loop isn't working
Hi my for loop doesn't seem to be working. Not too sure what I'm doing wrong, I want to go through all the pages in a document and convert the text frames to outlines. It is converting them, but only on the active page.

//JETLINE: INDESIGN PDF EXPORT SETTINGS SCRIPT VERSION 0.1//
alert("This script is designed configure you PDF export settings, to reduce the chances any issues getting through")
alert("Jetline InDesign PDF Export Configuration Script 08/01/2020")
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;
///DOCUMENT SETTINGS///
myDoc.documentPreferences.intent = DocumentIntentOptions.PRINT_INTENT;
///FIND EACH TEXT FRAME ON EACH PAGE AND CREATE OUTLINES///
var i;
for (i = 1; i < 250; i++);
myPage = app.activeWindow.activePage = app.activeDocument.pages[i];
for (j=myPage.textFrames.length- 1; j >= 0; j--)
{try{myPage.textFrames[j].createOutlines();
myPage.textFrames[j].remove();}catch(e){}}
///PDF EXPORT SETTINGS///
app.pdfExportPreferences.acrobatCompatibility = AcrobatCompatibility.ACROBAT_4;
app.pdfExportPreferences.standardsCompliance = PDFXStandards.PDFX1A2001_STANDARD;
app.pdfExportPreferences.pdfColorSpace = PDFColorSpace.CMYK;
app.pdfExportPreferences.subsetFontsBelow = 0;
app.pdfExportPreferences.useDocumentBleedWithPDF = true;
// Flatener Settings //
app.pdfExportPreferences.appliedFlattenerPreset.convertAllStrokesToOutlines = true;
app.pdfExportPreferences.appliedFlattenerPreset.convertAllTextToOutlines = true;
app.pdfExportPreferences.appliedFlattenerPreset.gradientAndMeshResolution = 600;
app.pdfExportPreferences.appliedFlattenerPreset.lineArtAndTextResolution = 1200;
// Marks //
app.pdfExportPreferences.colorBars = false;
app.pdfExportPreferences.cropMarks = false;
app.pdfExportPreferences.registrationMarks = false;
app.pdfExportPreferences.pageInformationMarks = false;
// Bitmap Settings //
app.pdfExportPreferences.colorBitmapCompression = BitmapCompression.ZIP;
app.pdfExportPreferences.colorBitmapQuality = CompressionQuality.MAXIMUM;
app.pdfExportPreferences.colorBitmapSampling = Sampling.NONE;
app.pdfExportPreferences.grayscaleBitmapCompression = BitmapCompression.ZIP;
app.pdfExportPreferences.grayscaleBitmapQuality = CompressionQuality.MAXIMUM;
app.pdfExportPreferences.grayscaleBitmapSampling = Sampling.NONE;
app.pdfExportPreferences.monochromeBitmapSampling = Sampling.NONE;
// Document Elements //
app.pdfExportPreferences.compressTextAndLineArt = false;
app.pdfExportPreferences.exportLayers = false;
app.pdfExportPreferences.exportNonprintingObjects =false;
app.pdfExportPreferences.exportWhichLayers = ExportLayerOptions.EXPORT_VISIBLE_PRINTABLE_LAYERS;
app.pdfExportPreferences.includeBookmarks = false;
app.pdfExportPreferences.includeHyperlinks = false;
app.pdfExportPreferences.interactiveElementsOption = InteractiveElementsOptions.APPEARANCE_ONLY;
alert("Settings Configured!");
}
else {
// No documents are open, so display an error message.
alert("No InDesign file for the script to work on is open");
}
}