Border with random colors
Hey,
I want to create a macro, which automatically creates a random colored border on every single page of the document. Random colors come from a set of 10 or so colors.
I can't manage to find an event for the creation of a new sheet, so this is my alternate plan:
- Button on page 1
- Macro for the button does:
-- Delete all rectangles in document
-- foreach page
--- create rectangle in 0,0 with 5cm width, 29,7cm height
--- set a random color from color set
Is there an easier way than deleting all existing rectangle shapes and adding one to each page?
Can anyone give me a snippet for the rectangle creation with the specific coords and for the creation of the color set and selection of a random color?
Thank you very much!
|