![]() |
#1
|
|||
|
|||
![]()
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 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). Last edited by nubuki; 12-10-2023 at 10:47 AM. Reason: Grammatical fixes |
Tags |
macro, ms-word, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to extract specific pages (Category) or arrange pages in a mail merge document? | kitlwy | Mail Merge | 7 | 09-30-2021 04:50 AM |
![]() |
Kiminator321 | Word | 8 | 04-29-2020 03:07 PM |
Scroll through pages on loop | ndearing | Word VBA | 5 | 12-17-2015 08:46 AM |
![]() |
alceste | Drawing and Graphics | 1 | 09-29-2013 06:28 PM |
![]() |
Lynn O'Shea | Word | 3 | 05-18-2010 12:32 AM |