Selection to New Page - Macro - Update

Sub SelectionToNewPage()
Dim sr As ShapeRange
Set sr = ActiveSelectionRange
sr.Cut
ActiveDocument.AddPages 1
ActivePage.ActiveLayer.Paste

End Sub

Can someone add this...

after moving the selection... immediately launch to rename the page option 

Parents
No Data
Reply
  • [CgsAddInMacro]
    public void MoveSelectionToNewPage()
    {
        ShapeRange sr = corelApp.ActiveSelectionRange;
        if (sr.Count == 0)
            return;
        Page page = corelApp.ActiveDocument.AddPages(1);
        Layer layer = page.ActiveLayer;
        sr.MoveToLayer(layer);
        DataSourceProxy proxy = corelApp.FrameWork.Application.DataContext.GetDataSource("WPageDataSource");
        proxy.InvokeMethod("OnRenamePage");
        
    }
Children