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

or

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


Select multiple sepecific pages and then delete them at once:

If you want to delete multiple specifiic pages from a large Word document, Kutools for Word's Select Pages feature can help you to select any pages first as you need, and then press Delete key to delete them at once.

doc delete multiple pages 4

Kutools for Word: with more than 100 handy Word add-ins, free to try with no limitation in 60 days. Click to Download and free trial Now!


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.



Recommended Word Productivity Tools

 

Kutools For Word - More Than 100 Advanced Features For Word, Save Your 50% Time

  • Complicated and repeated operations can be done one-time processing in seconds.
  • Insert multiple images across folders into Word document at once.
  • Merge and combine multiple Word files across folders into one with your desired order.
  • Split the current document into separate documents according to heading, section break or other criteria.
  • Convert files between Doc and Docx, Docx and PDF, collection of tools for common conversions and selection, and so on...
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.