View Single Post
 
Old 09-12-2025, 11:10 PM
19119 19119 is offline Mac OS X Office 2016 for Mac
Novice
 
Join Date: Sep 2025
Posts: 4
19119 is on a distinguished road
Default duplicate macro keeps giving syntax error

Hello,
I know nothing about coding but last time I needed to duplicate a whole page in Word, this worked for me:

Sub Duplicate()

Page = InputBox(“Enter the Page to Duplicate”)

Count = InputBox(“Enter Number of times to duplicate”)

With Selection

.GoTo wdGoToPage, wdGoToAbsolute, Page

.Bookmarks(“ \ Page”).Range.Copy

For i = 1 To Count: .Paste: Next

End With

End Sub

Right now, it's not working and keeps giving me the "syntax error" notification. The only difference is that last time, the document had multiple pages already and I was duplicating one page even more times. This time, the document just has one page which I have to duplicate into 60 pages.
Reply With Quote