Duplicate pages in quantity to first page

I wanted to duplicate my active page in quantity to the first page. I used the code but it brings error "Object does not support this property or method"

Sub DuplicateToFirstPage()
Dim sr As ShapeRange, nc As Integer, pnext As Page, sduplicate As Shape
nc = InputBox("enter required")
For i = 1 To nc
Set sr = ActivePage.Shapes.All
Set pnext = ActiveDocument.InsertPages(1, False, ActiveDocument.Pages(1))
For Each s In sr.ReverseRange
Set sduplicate = s.Duplicate
sduplicate.MoveToLayer pnext.Layers(s.Layer.Name)
Next s
Next i
pnext.Activate

End Sub

Parents
  • this also gives me problem.

    Sub DuplicateSelection()
    Dim sr As Shape, nc As Integer, pnext As Page, sduplicate As Shape

    For i = 1 To 1
    Set sr = ActiveSelection
    Set pnext = ActiveDocument.InsertPages(1, False, ActivePage.Index)

    Set sduplicate = sr.Duplicate
    sduplicate.MoveToLayer pnext.ActiveLayer

    Next i
    pnext.Activate

    End Sub

    I want to duplicate an active selection.  the bold line is giving me problem

Reply Children