Skip to main content

How to delete multiple specific pages in a Word document?

Author: Xiaoyang Last Modified: 2020-07-24

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.


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!

Best Office Productivity Tools

Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!

🤖 Kutools AI Assistant: Transform your writing with AI - Generate Content  /  Rewrite Text  /  Summarize Documents  /  Get Quick Answers, all within Word

📘 Document Mastery: Split Pages  /  Merge Documents  /  Export Selection in Various Formats (PDF/TXT/DOC/HTML...)  /  Batch Convert to PDF  /  Export Pages as Images  /  Print Multiple Files at once...

✏ Contents Editing: Batch Find and Replace across Multiple Files  /  Resize All Pictures  /  Transpose Table Rows and Columns  /  Convert Table to Text...

🧹 Effortless Clean: Sweap away Extra Spaces  /  Section Breaks  /  All Headers  /  Text Boxes  /  Hyperlinks  /  For more removing tools, head to the Remove group...

➕ Creative Inserts: Insert Thousand Separators  /  Check Boxes  /  Radio Buttons  /  QR Code  /  Barcode  /  Diagonal Line Table  /  Equation Caption  /  Image Caption  /  Table Caption  /  Multiple Pictures  /  Discover more in the Insert group...

🔍 Precision Selections: Pinpoint Specific Pages  /  Tables  /  Shapes  /  Heading Paragraphs  /  Enhance navigation with more Select features...

⭐ Star Enhancements: Navigate to Any Location  /  Auto-Insert Repetitive Text  /  Toggle Between Document Windows  /  11 Conversion Tools...

👉 Want to try these features? Download Kutools for Word today and experience the difference! 🚀
Free Download     Read More     Buy Now
 
Comments (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Ciao, invece per eliminare "rapidamente" in un documento di svariate pagine (circa 100) più fogli vuoti non consecutivi è possibile?
Esiste un procedimento per eliminare i fogli vuoti, senza doverli andare a ricercare.

Grazie.
This comment was minimized by the moderator on the site
thanks. from where you learn the vba
This comment was minimized by the moderator on the site
Thanks for very helpful solutions!!!!!!!!!!!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations