2 Quick Ways to Search for Word Documents with Specific Number of Pages

In today’s article, we would like to present you 2 quick ways to search for Word documents with specific number of pages.

Generally, there are a large number of files stored under one directory. What’s more, there can be various types of files. So, what if you need to search for a Word documents with specific number of pages? Or you happen to forget a document name but remember its total number of pages.Search for Word Documents with Specific Number of Pages

Our solutions bellow will lead you to search for target Word documents with specific number of pages.

Method 1: Search in Window Explorer

  1. Firstly, click “Start”.
  2. Then click “Computer” to open the windows explorer. Or if the file explorer icon is already on your taskbar, just click it.Click "Start"->Click "Computer"
  3. Next go to the disk and the specific location where you keep all files.
  4. Now right click on the empty space on the first row.
  5. Check “Type” and “Pages”. If they are not visible there, click “More” at the bottom of the menu.Right Click on Empty Place on the First Row->Check "Type" and "Pages"
  6. In “Choose Details” box open, check “Pages” and “Type” boxes and click “OK”.Check Boxes->Click "OK"
  7. Then move cursor over “Type” column until the drop-down button shows. Click it.
  8. Check “Microsoft Word Document” box. You can see only Word documents are left available. Then see the “Pages” column to find the document with specific number of pages.Check "Microsoft Word Document" Box

Method 2: Run Word Macro

  1. First and foremost, press “Alt+ F11” to invoke VBA editor in Word.
  2. Next click “Normal” and click “Insert” on the toolbar.
  3. Choose “Module” to create a new one.Click "Normal"->Click "Insert"->Click "Module"
  4. Then double click to open coding space on the right-hand.
  5. Paste the following macro there:
Sub FindWordDocumentWithSpecificPageNumber()
  Dim lPageNumber As Long
  Dim lSpecificPageNumber As Long
  Dim strDocList As String
  Dim strDocName As String
  Dim objWordApplication As New Word.Application
  Dim strFile As String
  Dim strFolder As String

  strFolder = InputBox("Enter the folder address", "Folder Address", "For example:E:\test word\test\")
  lSpecificPageNumber = InputBox("Enter the page number you want to search", "Specific Page Number", "For example:1")
 
  strFile = Dir(strFolder & "*.doc*", vbNormal)
 
  While strFile <> ""
    With objWordApplication
      .Documents.Open (strFolder & strFile)
      lPageNumber = .ActiveDocument.ComputeStatistics(wdStatisticPages)

      If lPageNumber = lSpecificPageNumber Then
        strDocName = .ActiveDocument.FullName
        strDocList = strDocList & strDocName & vbCr 
      End If
 
      .ActiveDocument.Close
    End With
    strFile = Dir()
  wend
  Set objWordApplication = Nothing
 
  If strDocList <> "" Then
    Documents.Add Template:="Normal"
    ActiveDocument.Range.Text = strDocList
  Else
    MsgBox ("There is no match document.")
  End If
End Sub
  1. Next click “Run” button or hit “F5”.Paste Codes->Click "Run"
  2. Now there is an input box prompting up. Enter the folder address in the text box and don’t forget add “\” at the end of the string.
  3. Click “OK” to move to next step.Enter Folder Address->Click "OK"
  4. In the second box, enter a number in its text box. The number indicates the total page of the target document. Similarly, click “OK”.Enter a Number in the Text Box->Click "OK"

There will be a document open in Word, with the full name of the target document on it.

Address the Plight of Word Collapse

Generally, Word is a mighty tool to process daily work. Yet, now and then, problems and difficult issues can occur. And sometimes, the situation is a little bit severe that you can end up with damaged word. In such scenario, you are going to need an advanced repairing tool to retrieve your work.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including xls repair and pdf repair software products. For more information visit www.datanumen.com

Comments are closed.