i want to do indexing in my designs but sometime design has 10 pages sometime 100 and sometime its 500
i will wrote indexing according to the pages for example i have 10 pages book and now i have wrote all the index example are below
abc
def
ghi
jkl
mno
pqr
stu
wvx
yz1
234
now i will create a box of 15mm X10mm height box with a cut mark of 2 mm in bottom right of the box and
add all text to box according to the box for example 1st index in top 1st box, 2nd index in 2nd box etc.
now i group all box with index.
now i have 10 box with index grouped.
now i move them to the bottom right side according to the series
last step i paste 1 by 1 on different pages. 1st index on 1st page, 2nd on 2nd page and soo on
just like this i want macro
another way then using print merge - modified Eskimo's code from here http://community.coreldraw.com/talk/coreldraw_graphics_suite_x6/f/704/t/55766#pi1484filter=all&pi1484scroll=false
Sub SlipPages()Dim s1 As ShapeDim s2 As ShapeDim sr As ShapeRangeDim lay1 As LayerActiveDocument.Unit = cdrInchx = 8.705step = 0.394y = 11.339 + stepActiveDocument.BeginCommandGroup "AllShapesToPages"Optimization = TrueSet sr = ActivePage.Shapes.AllFor Each s1 In sry = y - step Set lay1 = ActiveDocument.AddPages(1).ActiveLayer Set s2 = s1.Duplicate s2.MoveToLayer lay1 s2.CenterX = x s2.CenterY = y i = i + 1 If i = 29 Then i = 0: y = 11.339 + stepNext s1Optimization = FalseApplication.RefreshActiveDocument.EndCommandGroup
End Sub
paraggoyal said:you can make it in a less step too let me ready the objects manually and move on the exact position where i actually want now i have suppose 20 objects or 50 objects/index from top to bottom in a series now move all the objects to different different pages from top to bottom respectively to different pages example just paste the 1st box from top to the same page where the index already we can seen no movement for the 1st top box 2nd box has to move from top on 2nd next page from the current page on exact same position 3rd box from top on 3rd next page from the current page on exact same position and so on it can also help me (please note i want to move on the next page from the current page for example i am on 42 page no. i want my object to work 1st object on 42 page then 2object on 43 page and so on)
At the moment, I am not using a computer with X5 on it, but this works for me in X7:
Sub move_sel_to_pages_top_to_bottom()Dim sr As ShapeRangeDim shape_index As LongDim start_page_index As Long Optimization = True ActiveDocument.BeginCommandGroup "selected to pages top-to-bottom" EventsEnabled = False On Error GoTo ErrHandler Set sr = ActiveSelectionRange sr.Sort "@shape1.Top > @shape2.Top" start_page_index = ActiveDocument.ActivePage.Index If sr.Count = 0 Then MsgBox "Nothing is selected.", vbInformation GoTo ExitSub Else If sr.Count = 1 Then MsgBox "Only one item is selected; nothing to move.", vbInformation GoTo ExitSub End If End If If ActiveDocument.Pages.Count - start_page_index + 1 < sr.Count Then MsgBox "Not enough pages are available for the selected items.", vbInformation GoTo ExitSub End If For shape_index = 2 To sr.Count sr(shape_index).MoveToLayer ActiveDocument.Pages(start_page_index + shape_index - 1).ActiveLayer Next shape_index ActiveSelectionRange.RemoveFromSelection Application.RefreshExitSub: Optimization = False EventsEnabled = True Application.Refresh ActiveDocument.EndCommandGroup Exit SubErrHandler: MsgBox "Error occurred: " & Err.Description Resume ExitSub End Sub
awesum eskimo thanks its working in x6 too :D