2 Replies Latest reply on Oct 27, 2014 3:25 AM by Murali_Vetha

    Flowed indd document not saved in same path

    Murali_Vetha Level 1

      Hi All,

       

      In my below coding is not work properly. Actually, When I used Dialog options to select indesign file and then select wordfile to place in the selected indesign file.

      And then, save the indesign file based on wordfile naming and in the same indesign path.

       

      In this coding, upto working with the place option itself, Now save is not work properly in the same indesign path, it has been saved as undefined. Please advice. See below coding

       

      var myIndFile = File.openDialog ("Select Indesign File");
      var myWordFile = File.openDialog ("Select Word File");
      
      var myWordFileName = myWordFile.name;
      var myIndFilePath = myIndFile.filePath;
      
      app.open (myIndFile);
      
      var mydoc = app.activeDocument;
      
      mydoc.textPreferences.smartTextReflow = true;
      mydoc.textPreferences.limitToMasterTextFrames = false;
      mydoc.textPreferences.deleteEmptyPages = false;
      mydoc.textPreferences.addPages = AddPageOptions.endOfStory;
      
      mydoc.pages.item(0).textFrames.item(0).place(File(myWordFile));
      
      alert("Done");
      
      app.activeDocument.save(new File(myIndFilePath + " \ " + myWordFileName)
      
      
      
      
      
      
      
      );
      

       

       

      Regards,

      Vetha