Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Delete All Content on All Pages?

Tagged: 

Return to Member Forum

  • Author
    Posts
    • #77560
      Design Dept
      Participant

      I’m sure this must have been covered before but I cannot find…
      I have a 70+ page document and want to delete all content on all of these pages so I can then save as a new document… How can I delete all the content at once without having to go to each page/select all/delete…..?

    • #77564
      Anonymous
      Inactive

      Create a new layer

      And delete the other layers.

      All items will be deleted.

    • #77604

      Without removing any layer or creating any layer, the following ExtendScript (JavaScript) should do what you want:

      [code]

      app.doScript
      (

      removeAllPageItems,
      ScriptLanguage.JAVASCRIPT,
      [],
      UndoModes.ENTIRE_SCRIPT,
      "Remove All PageItems | SCRIPT"

      );

      function removeAllPageItems(){

      //ExtendScript (JavaScript):
      var myDoc = app.documents[0];

      //Unlock all layers in case some or all layers are locked:
      myDoc.layers.everyItem().locked = false;

      //Unlock all page items in case some or all page items are locked:
      myDoc.pageItems.everyItem().locked = false;

      //Remove all page items in one go:
      myDoc.pageItems.everyItem().remove();

      };
      [/code]

      Hope, that the code formatting in the forum’s editor is working as expected ;-)

      Uwe

    • #77605

      Darn. It did not.
      Remove [code] and [/code] from the beginning and the end of the script and give it a try.

      Uwe

    • #77624

      Is there a particular reason *not* to do File > New > Document ?
      Or to put it another way, what do you want to keep from the “old” document?
      If you need to keep master page items, styles etc, you could copy the master pages to a fresh new 70-page document, and import the styles from the old (using Load Styles from the panels).

      Chris.

    • #77644
      Anonymous
      Inactive

      You could copy the master page items to a new layer, then delete the old layers too :)

      If you need to keep the same styles you can load styles using the Paragraph Styles sub menu

Viewing 5 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads