I have created this simple macro on X6 that will move everything in the page to the right side outside the page. I have no knowledge coding but I need to change it in order to run through all the pages selecting and moving everything in each page to the right side outside the page and stacking evrything vertically. Page size will always be 24 x 18 inches.
I will really appreciate it if I could get some help with this. I have to do this almost everyday for laser engraving files with many pages. It will be a real time saver if I could automate this task.
Thank you in advance and this is the macro created but working only in one page.
Sub Macro1() ' Recorded 1/20/2023 ActivePage.Shapes.All.CreateSelection ActiveSelection.Move 26, 0#End Sub
You could try this:
Sub move_things() Dim pThis As Page For Each pThis In ActiveDocument.Pages pThis.Shapes.All.Move 26, 0 Next pThis End Sub
or perhaps this:
Sub move_things() Dim pThis As Page For Each pThis In ActiveDocument.Pages pThis.Activate ActivePage.Shapes.All.Move 26, 0 Next pThis End Sub
Thank you soooo much. The first one works!, only thing is that it is stacking everything on top of each other instead of vertically, but I guess I can just space them after, no big deal. Also, other than the first page, I only see the obects moved if I change pages manually.
I trully appreciate your quick answer.
Ah, I forgot that we were in the X6 forum. No joy for X6; sorry!
The oldest version I have available to me is X7, so that's what I use for creating those macros.
Ok, no problem. Thanks again
Hello, and sorry to ask again.
Based on what you did I have been trying to edit it to create a macro that will flip horizontally everything in a page and do the same in all pages in the documents activating all pages.
I am having no luck, Is it possible to change the bellow code to run through the whole document?
Thank you in advance
Sub Macro1() ActivePage.Shapes.All.CreateSelection ActiveSelection.Flip cdrFlipHorizontalEnd Sub
Sub flip_things() Dim pThis As Page For Each pThis In ActiveDocument.Pages pThis.Shapes.All.CreateSelection ActiveSelection.Flip cdrFlipHorizontal Next pThis End Sub
Thanks a lot!