i want all the pages data into a single page.
macro please
Sub FlattenPages() Dim p As Page, s As Shape, sr As ShapeRange Dim i& Optimization = True ActiveDocument.BeginCommandGroup "FlattenPages" ActivePage.CreateLayer "Work Layer" For i = 1 To ActiveDocument.Pages.Count Set sr = ActiveDocument.Pages(i).Shapes.All For Each s In srsr.MoveToLayer ActiveLayerNext sNext iCall delEmptyPagesCall MoveToLayer1ActiveLayer.DeleteActiveDocument.EndCommandGroupOptimization = False ActiveWindow.RefreshEnd Sub
Sub delEmptyPages() Dim p As Page For Each p In ActiveDocument.Pages If p.Shapes.All.Count = 0 Then p.Delete End If If ActiveDocument.Pages.Count = 1 Then Exit Sub End If Next pEnd Sub
Sub MoveToLayer1() Dim shp As ShapeFor Each shp In ActiveLayer.Shapes shp.Layer = ActivePage.Layers("Layer 1") NextActiveWindow.RefreshEnd Sub
o thanking you so much guruji. I will check it later. going outside.
sir not working
Did you copy everything above? You have to copy all 3 macros
sir i just copied flattend pages only and pasted and runned