How to Perform Advanced Search for Exact and Partial Matches in Word and PDF
Question details
The user is looking for a way, such as an API or SDK, to perform advanced searches that can calculate the percentage of exact versus partial text matches across Word and PDF documents.

- Product
- Word and PDF
- Device & OS
- not provided
- Scenario
- Analyzing document text to calculate and compare the exact versus partial phrase match percentages across multiple files.
- Observed behavior
- Standard search functionalities in Word and PDF readers only highlight phrases and find occurrences, but do not provide statistical calculations for exact versus partial match percentages.
Determine whether you need basic text highlighting for manual review or automated statistical analysis, as calculating match percentages requires custom programming and API integration.
Use the Built-in Find Function for Basic Searches
Use the standard Find tool to locate exact and partial phrases manually within your Word or PDF files.
While standard Office applications and PDF readers do not calculate match percentages, their built-in search functions are highly effective for basic phrase locating and highlighting.
Open your document in Microsoft Word or a PDF reader like Adobe Acrobat, and press the Ctrl + F keyboard shortcut to bring up the Find dialog box.
Type the exact or partial phrase you want to find into the search bar. The application will automatically highlight all matching text instances within the document.
Use the up and down navigation arrows in the search pane to jump between highlighted matches and review the context manually.

Implement a Document-Search API for Percentage Calculation
Utilize specialized document search APIs or SDKs to programmatically calculate exact and partial match percentages.
Seamlessly Manage and Search Word and PDF Files with WPS Office
While custom APIs are needed for percentage-based match calculations, WPS Office provides a free, lightweight, and user-friendly alternative to Microsoft Office. With native support for both Word and PDF formats in a single tabbed interface, you can easily open, search, and manage all your documents efficiently.
- 1. Download the software: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the application on your device.
- 3. Search across formats: Launch WPS Office, open both your Word and PDF files in separate tabs, and use Ctrl + F to easily search for phrases across your documents.

Frequently Asked Questions
Can Microsoft Word calculate the percentage of matched text?
No, Microsoft Word's native Find feature only highlights text occurrences and provides a total count of matches. It does not have the capability to calculate exact versus partial match percentages.
What is the best way to calculate text similarity in PDFs?
To calculate text similarity or match percentages, you will need to use a programming language (like Python) combined with document-parsing libraries or a dedicated text comparison API to extract the text and analyze it programmatically.
Where can I get developer support for Microsoft Office SDKs and APIs?
For developer-level inquiries, API implementations, and SDK support regarding Microsoft Office products, the Microsoft Q&A forum is the recommended platform to ask implementation questions.




