1 Reply Latest reply on Aug 27, 2012 9:42 PM by bgfrhlp

    [JS] Pages placePoint value doesn't work


      Hello everyone,


      I am trying to place an excel file to a textframe set in masterpage.


      The first digit of the placePoint value array doesn't affect the position of the text frame. If I set the number too high, the script throws an error stating "This value would cause one or more objects to leave the pasterboard". The second affects the y-coordinate as expected.


      1    doc = app.open(filePath = "d:/base.indt");

      2    excelFile = new File ("d:/source.xlsx");

      3    docStoryList =  doc.pages[0].place (excelFile, [2, 7], undefined, false, true);

      4    docStory =  docStoryList[0];



      Many thanks in advance!


        • 1. Re: [JS] Pages placePoint value doesn't work
          bgfrhlp Level 1

          I founded help here:



          Instead placing the Excel file to a page, it should be placed to a text frame. There must be only one textframe in the masterpage for this to work.


          1     doc = app.open(filePath = "d:/Base.indt");

          2     doc.textPreferences.smartTextReflow = true;

          3     masterTextFrame = doc.pages[0].appliedMaster.textFrames[0].override(doc.pages[0]);

          4     excelFile = new File ("d:/Source.xlsx");

          5     docStory = masterTextFrame.place (excelFile);


          Still thinking how the placePoint is supposed to be used. Would be nice if someone pointed the error in my code.

          1 person found this helpful