#1
|
|||
|
|||
Delete Page
While entering this code, I am getting the error bellow: Please help
Dim Rng As Range, iPage As Long iPage = 2 With ActiveDocument Set Rng = .GoTo(What:=wdGoToPage, Name:=iPage) Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page") Rng.Delete End With Error: Wrong number of argument or invalid property assignment . |
#2
|
||||
|
||||
The code works fine for me.
PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen. Please also don't resurrect old threads - start a new one. The one in which you posted was already inactive for over 2 years when you posted. Splitting your post & this reply off to a new thread.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Delete a page after Section Break Next Page | Aston | Word | 9 | 04-27-2022 07:38 AM |
I can't delete my page numbers | mj2000 | Word | 1 | 02-15-2014 12:34 PM |
delete page break | seeker62 | Word | 3 | 07-22-2013 06:49 PM |
Can't Delete bottom page | bad_dog81 | Word | 1 | 07-08-2011 02:54 AM |
How do you delete a blank page at end? | aerophil | Word | 4 | 10-24-2009 05:04 AM |