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
Sub MoveSelectionToNewPage()Dim 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 IfEnd Sub
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