I want to move objects with vba such that all objects in page 8 will move to page 4, all objects in page 7 to 3, ll objects in page 6 to 2. I need a simple line of code to do this?
simple code line, as you requested:
ActiveLayer.Shapes.All.MoveToLayer ActiveDocument.Pages(1).ActiveLayer
'move all shapes from active page (2-...) to first page
yes, i know much about that. what i really wanted is using a constant
code while i'll use a msgbox to enter any page(s) i want.
I mean something of this nature
Sub MoveObjects()
Dim s As Shape, d As Document Dim sh As Integer For sh = d.Pages.Count To 5 Step -1 For Each s In d.Pages(sh).Shapes s.Copy 'copy from source d.Pages(sh - 4).Activate Pages(sh - 4).Paste 's.Delete Next s Next sh
End Sub