I'm trying to create a vba to loop through current page to the end of page and paste a copied shape on each of said pages.
I tried:
Code:
Sub PasteAndAlignItems()
Dim totalPages As Integer
Dim currentPage As Integer
Dim startPosition As Range
totalPages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)
Set startPosition = Selection.Range
For currentPage = 1 To totalPages
startPosition.Select
Selection.PasteSpecial Placement:=wdInLine
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Count:=1
Next currentPage
End Sub
Works for text but not shapes; shapes get pasted on the same page with the cursor
Anyone knows what's wrong?
It would be very helpful if someone could add a snippet to position the pasted shape with horizontal alignment (left relative to page), vertical alignment (top relative to page).