Sub SelectionToNewPage()Dim sr As ShapeRangeSet sr = ActiveSelectionRangesr.CutActiveDocument.AddPages 1ActivePage.ActiveLayer.Paste
End Sub
Can someone add this...
after moving the selection... immediately launch to rename the page option
These are csharp macros, you can use Visual Studio Tools for Application, to create and edit,
but you need to have Visual Studio installed on your machine, in the case of X8 you need Visual Studio 2015, so I don't use this area either . I have my own tool that allows me to edit in any text editor even in notepad
https://github.com/bonus630/Bonus630DevToolsBar
working brother.
can you please add fit to page for this new selection in new page
Sub MoveSelectionToNewPage()'MOVE SELECTED SHAPES TO NEW PAGEDim sr As ShapeRangeSet sr = ActiveSelectionRangesr.Cut 'Move Selection'sr.Copy 'Copy SelectionActiveDocument.AddPages 1ActivePage.ActiveLayer.Pastemyname = InputBox("Page Name?", "RENAME PAGE")If Trim(myname <> "") ThenActivePage.Name = mynameEnd If
'FIT TO PAGEmyfactorwidth = ActivePage.SizeWidth / ActivePage.Shapes.All.SizeWidthmyfactorhight = ActivePage.SizeHeight / ActivePage.Shapes.All.SizeHeightIf myfactorwidth < myfactorhight Thenmyfactor = myfactorwidthElsemyfactor = myfactorhightEnd If
ActivePage.Shapes.All.StretchEx ActivePage.CenterX, ActivePage.CenterY, myfactorActivePage.Shapes.All.CenterX = ActivePage.CenterXActivePage.Shapes.All.CenterY = ActivePage.CenterYEnd Sub
This error is coming brother