Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

How to delete multiple specific pages in a Word document?

In a Word document, you can select the current page content, and then press Delete key to delete the current page easily. But, if you need to remove multiple pages from a large Word file, how could you solve it quickly?

Delete a range of pages in Word document with Go To feature

Delete multiple specific pages in Word document with VBA code


Delete a range of pages in Word document with Go To feature

If you want to delete a range of consecutive pages from a Word document, the Go To feature can do you a favor.

1. Launch the Word document that you want to delete pages.

2. Then press F5 key to open the Find and Replace dialog box, under the Go To tab, click Page in the Go to what list box, and then enter the start page number you want to delete from, and press Enter key to go to the specific page, see screenshot:

doc delete multiple pages 1

2. Then, close this Find and Replace dialog box, and press F8 to turn on the Extend mode.

3. Go on pressing F5 key to open the Find and Replace dialog, this time, enter the end page number that you want to delete, and then press Enter key. All pages from 15 to 20 have been selected at once. See screenshot:

doc delete multiple pages 2

4. At last, press Delete key directly to delete these pages at once.


Delete multiple specific pages in Word document with VBA code

To delete multiple specific pages in a Word file which are non-consecutive, the following VBA code can help you.

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Delete multiple specific pages in Word file:

Sub DeletePagesInDoc()
    Dim xRange As Range
    Dim xPage As String
    Dim xDoc As Document
    Dim xArr
    Dim I, xSplitCount As Long
    Application.ScreenUpdating = False
    Set xDoc = ActiveDocument
    xPage = InputBox("Enter the page numbers of pages to be deleted: " & vbNewLine & _
            "use comma to separate numbers", "KuTools for Word", "")
    xArr = Split(xPage, ",")
    xPageCount = UBound(xArr)
    For I = xPageCount To 0 Step -1
        Selection.GoTo wdGoToPage, wdGoToAbsolute, xArr(I)
        xDoc.Bookmarks("\Page").Range.Delete
    Next
    Application.ScreenUpdating = True
End Sub

3. Then, press F5 key to run this code, and a prompt box is popped out to remind you enter the page numbers that you want to delete, please separate the page numbers by comma, see screenshot:

doc delete multiple pages 3

4. And then, click OK button, all the pages you specified have been deleted at once.


Kutools for Word

More than 100 Advanced Functions for Word 2003, 2007, 2010, 2013, 2016 and 2019

shot-kutools-700-225-kte

More Features  |  Free Download  |  Only $39.00 for hundreds of functions

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.