4 Replies Latest reply on Oct 25, 2018 2:23 AM by Laubender

    copy without constructor

    Johnwhite Level 1

      Hi experts

       

      How to tell InDesign what I want to copy just the contents but not the constructor and formatting?

       

      my script as below, but not working:

       

      var 
          mObject = app.selection[0], 
          mTarget;
      if (mObject.constructor.name == ("Cell") || mObject.constructor.name == ("Table")) {
          mTarget = mObject.cells.everyItem().paragraphs.everyItem().contents;
          }
      if (mObject.hasOwnProperty ("paragraphs")) {
          mTarget = mObject.paragraphs.everyItem().contents;
          }
      app.copy(mTarget);
      

       

      Could someone tell me how to make it happen?

       

      thanks

      regard

       

      John