How to Delete Pages in Word (Blank or Not)

您所在的位置:网站首页 2022年燃料油市场分析 How to Delete Pages in Word (Blank or Not)

How to Delete Pages in Word (Blank or Not)

2023-03-29 20:01| 来源: 网络整理| 查看: 265

Today I’m going to show you how to delete pages in Word. Maybe you have unwanted content on some of your pages which you want to get rid of by deleting the entire pages. Or there are some blank pages at the end of your Word document that you want to delete.

In this post, you’ll learn how to remove a single page or multiple pages in MS Word using the methods outlined below.

The default option to delete pages in Word is to select and delete the content on the pages, then Word will automatically delete the page as well. Microsoft Word doesn’t deal with pages. Rather, it deals with the text (content) on those pages. Therefore, there’s no way you can delete pages in Word with a single action unless with the help of some VBA code which I’ll share with you soon.

In this illustration some VBA code was used to achieve such results. You’ll learn this trick in the sixth section of this post.

Table of Contents

How to Select and Delete pages in Word

This option involves selecting all the text on the page or pages that you want to delete and then delete by either using the Delete key or Backspace.

Without further ado, below is how you can select and delete pages in MS Word.

Quick Solution:

Select all the content on the page or pages you want to delete.Then press Delete or Backspace to delete all the content

Word will automatically delete all the pages that were holding the content.

If you don’t understand the above simple steps, please keep reading below for further explanations.

Option 1: Using the “Navigation Pane”

In MS Word, one of the simplest ways you can select and delete blank or unwanted pages is to use the navigation pane.

It allows you to view the pages thumbnails, which you can select and delete with the delete key.

Obey the steps below to learn how:

Activate the Navigation Pane. Go to the View tab and place a check mark on the Navigation Pane. Click to activate the Navigation Pane Click to activate the Pages tab in the Navigation Pane. Select the Pages tab Select the page you want to delete then press the DELETE key. In my case, I’m deleting the extra blank page (Page 12) Select the blank page and press the Delete key

As soon as you press the delete key, the selected page will get deleted.

Just know that in Word you can only select and delete the pages one after the other. You cannot perform a bulk delete unless with the help of some Macro which you’ll also learn later in this tutorial.

Option 2: How to select and delete the current page

In this method, I assume that you want to delete only one page in your Word document. You’ll learn how to delete multiple pages in the next section.

With this approach, you can easily delete only the current page.

Thus, if you’re not on the page you want to remove, navigate to that page and click inside the page.

If you are already on the page you want to delete, then let’s get started with the steps below:

Press Ctrl+G or F5. Word will display the Find and Replace dialog. Press F5 to open Find and Replace Dialog Click to activate the Go To tab. Click the Go to tab In the Go to what list box, click to select Page (It should be selected by default) Type \page In the Enter page number field, type \page.Then press Enter and close the dialog. Now every content on that page should be selected. Press Delete to delete the page.

NOTE: If there were pages after the deleted page, those pages will shift to replace the page or pages you just deleted.

Option 3: How to select and delete multiple pages

Using the Find and Replace, you can also select and delete multiple pages all at once.

This is particularly useful if the pages you want to delete are many and consecutive, like page 23 to 30 (7 consecutive pages).

To select and delete such multiple pages in Word, the steps are outlined below:

Press Ctrl+G or F5. Word will display the Find and Replace dialog. Delete pages in Word Click to activate the Go To tab. Delete pages in Word In the Go to what list box, click to select Page (It is selected by default) Click to select the page optoin Type 23 into the Enter page number field. We used 23 because that’s the page from which we want to start deleting. Thus, you can enter a different page number. It should be the beginning of the pages you want to delete.After typing the page number (23), press Enter. Type 23 in the Enter Page number field Press the Esc key to dismiss the dialog.Without clicking anywhere or pressing any key, press the F8 key once.Then press Ctrl+G or F5 key again to display the Find and Replace dialog.This time around, type 30 into the field labeled “Enter page number”. We are typing 30 because that’s the page to which we want to select and delete. Thus, if you are deleting from page 5 to 20, you will enter 5 for the first time and then 20 for the second time. Type 30 in the Enter Page number field After typing the page number (30), press Enter. You’ll notice that all the content on page 23 to 30 is selected.Press the Esc key to close the Find and Replace dialog.At this point, if you hit the Backspace or Delete key, Word will delete all the 7 pages (starting from page 23 to 30).

This is how you may delete multiple pages in Word.

Option 4: Select and delete pages Using the Mouse

Another way you may delete pages in Word is to highlight all the content on the pages you want to delete using the mouse, then press delete.

To highlight or select an entire page using the mouse:

Go to the page you want to select and position your cursor at the beginning of the text. Click and hold your primary mouse button (i.e. the left-button). While holding the mouse button, drag the cursor to the end of the text on the page, and then let go of the mouse button.

Bonus Tip: If you are deleting multiple pages using the mouse to select, zoom the pages to say 10% or 20% so that you can see many pages on the screen at the same time. Then use the mouse to select the pages you want to remove and press the delete key to delete them.

See screenshot:

Delete pages in Word by selecting the text with a mouse drag Option 5: Select text using the keyboard

You can also select and delete pages in Word using the keyboard.

To do so, place your cursor at the start of the page, and press Ctrl+Shift+down-arrow. Word will be making the selection by paragraph after paragraph until the last paragraph.

To deselect a paragraph, whilst still pressing down the Ctrl+Shift, press the up-arrow key.

Step 2: After making the selection, press the Delete or the Backspace key to delete the text.

As soon as you delete the text, Word will delete the page as well. However, if there were pages after the deleted page, those pages will replace the deleted pages.

Option 6: How to delete blank pages in Word

At times, you may not just want to delete pages, but some extra blank pages especially at the end of the document.

Normally, this extra page is caused by a non-removable end-paragraph that gets pushed down to a new blank page.

When that happens, deleting this page with the Delete or Backspace key won’t work.

Instead, you should format the end-paragraph to fit into the preceding page.

The steps below will show you how.

Press Ctrl+Shift+8 on PC or Command ⌘+8 on Mac. This will show all the paragraph marks in the document.Select the last paragraph mark on the last blank pageChange the font size to 1 or 01 then press enter. Delete pages in Word by formatting the non-removable end-paragraph

As soon as you change the font size of the last paragraph mark, it will fit into the preceding page, deleting the unwanted blank page.

Again, press Ctrl+Shift+8 on PC (Or Command-⌘+8 on Mac). This will hide all the paragraph marks in the document. Option 7: Delete specific pages in Word using Macro

By default, you can’t delete pages in word with a single action; like typing in the page number of the pages you want to delete, and then with a click on a button, the pages will be deleted.

However, with the help of some VBA code, this task is possible.

delete specific multiple pages with VBA

All you have to do is type the page numbers into a box separated with a comma, then click OK to delete the specified pages.

Without further ado, let’s get started.

With the Word document opened, press Alt+F11. This shortcut will open the VB Editor Window. Press Alt+F11 to display the VBA editor In the Project pane, right-click ThisDocument under the project you are working on, then go to Insert→Modul. Insert a module for your project A Module window will appear. Copy and paste the following code:

Sub DeletePagesInWord()

    Dim iRange As Range

    Dim iPage As String

    Dim iDoc As Document

    Dim iPageCount As Integer

    Dim iArr

    Dim I, xSplitCount As Long

    Application.ScreenUpdating = False

    Set iDoc = ActiveDocument

    iPage = InputBox(“Enter the page numbers of pages to deleted: ” & vbNewLine & vbNewLine & _

“NOTE: Use comma to separate page numbers”, “Delete Pages”, “”)

    iArr = Split(iPage, “,”)

    iPageCount = UBound(iArr)

    For I = iPageCount To 0 Step -1

        Selection.GoTo wdGoToPage, wdGoToAbsolute, iArr(I)

        iDoc.Bookmarks(“\Page”).Range.Delete

    Next

    Application.ScreenUpdating = True

End Sub

Here’s how the editor will look after pasting the above code:

copy and paste the code into the code editor Press F5 to test the code. Delete multiple specific pages using VBAHere the macro was added to the Quick Access Toolbar for easy access

If the code works fine, save the Macro and assign it to a shortcut key or pin it to your Quick Access Toolbar. The remaining steps will show you how to pin a macro code to the QAT.

Press Ctrl+S to save the macro and then close the VB editor window.Right-click one of the tabs and select Customize Quick Access Toolbar from the shortcut menu. Delete pages in Word Select Macros from the drop-down labeled Choose commands from. Delete pages in Word Select the Macro you saved and click on the Add button to add it to your Quick Access Toolbar. Delete pages in Word Click Ok.

Now you’ll have the macro available on your QAT. This is just a onetime process. The next time you want to delete pages in Word, you don’t have to go through all the steps, you just click on the macro icon from the QAT and Word will prompt you for the page number of the pages you want to delete.

THINGS YOU SHOULD NOTE HERE: Since the document contains VBA code, make sure you save it as a Macro-Enabled Document.Using Macro from the Quick Access Toolbar works ONLY for the Word document that contains the code. For this code to work in another document, copy and paste the code in the document too. But if you want the Macro to work in all your Word documents, you should consider creating an add-in Bonus Option: Delete the current page using VBA Macro

This is a very quick way to delete the current page in your document.

Using the steps in the preceding approach to delete pages in Word, you can use the macro below to save the day:

Sub DeleteCurrentPage()

    ActiveDocument.Bookmarks(“\Page”).Range.Delete

End Sub

You can assign this macro to a shortcut key so that you can easily delete the current page or pin it to the QAT as shown in option 6.

To assign a Macro to a keyboard shortcut read this guide.

Conclusion

You can use the options above to remove pages in word.

However, if you try all the options on this page and still cannot delete some pages in your document, please let me know by your comment below.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3