Macro to delete all outside page

Hi folks,

I am currently working on a macro to delete all content outside the page. This is benificial especially after import of data. This maco could delete eveything outside the page without any further inverstigations if "out there" is something at all (and if so, get rid of it).

My current approach (for now it is assumed every item is accessible, not locked, hidden etc.):

  • Select all in page
  • Lock this selection
  • Select all
  • Delete
  • Select all in Page
  • unlock

I have the feeling that this approach is not very elegant. Any ideas or experience to do this with a different approach?

Thanks!
Christian