With PowerGREP, you can quickly search for a piece of information through files and folders on your computer, including Microsoft Word documents saved in DOC, DOT, DOCX, and DOTX files. Simply enter a keyword or phrase in the Search box, select which folder PowerGREP should go through and which types of files are of interest. When you click the search button, PowerGREP will present you with a list of MS Word documents and other files in which the text you entered in the search box was found. The list will show one line of context for each match. You can instantly view all the text in the document, with highlighted matches, by double-clicking a match in the results.
When you do not know in advance exactly what you are looking for, PowerGREP’s rich regular expression support allows you to search for virtually anything by specifying the form of what you want, and let PowerGREP find the actual text matching that form.
All of PowerGREP’s search features are available when working with Word documents. This includes collecting data, unlimited lists of search terms, file sectioning, file filtering, customized context, and so on.
Search and Replace or Delete Through Word Documents in DOCX Format
With PowerGREP you can also bulk edit or redact Word documents saved in DOCX and DOTX files. To do this, set the “action type” to “search and replace” or “search and delete”. In the File Selector, make sure “file formats to convert to plain text” is set to “writable proprietary formats” or “all writeable formats”. Substituted text will retain its formatting, even though PowerGREP doesn’t show you any formatting.
All of PowerGREP’s features for replacing or deleting matches are available when working with DOCX files. This includes unlimited lists of search terms, regular expressions with replacement strings that can reuse the matched text, extra processing, file sectioning, file filtering, customized context, and so on.
You can even open and edit DOCX files in PowerGREP’s built-in text editor. The editor only shows the actual text in the file, with some basic formatting such as paragraph breaks and list bullets or numbers. The document will retain all its formatting when you edit and save the file in PowerGREP.
The DOCX format is the default format for Word documents saved by Word 2007 and later. Older versions of Word used the DOC format. PowerGREP is not able to modify DOC files. You cannot search-and-replace through DOC files using PowerGREP. If you want to modify Word documents with PowerGREP, consider switching to the DOCX format.
Work with The Raw XML Inside DOCX Files
Technically, DOCX files are ZIP archives that contain a bunch of XML files along with support files such as images. Such file formats are called compound documents in PowerGREP. You can search through and even modify the XML inside DOCX files by setting “file formats to convert to plain text” to one of the configurations labeled “compound documents”. This will also provide you access to all the embedded files via the File Selector. But even in this mode PowerGREP still treats DOCX files as documents. So any actions that copy, move, or back up files will copy, move, or back up DOCX files as a whole rather than the files they contain, to avoid breaking your documents.
Searching through the raw XML can be very useful when you want to search for or modify meta data in DOCX files, such as hyperlinks. You’ll want to set “context type” to “no context” to avoid unreasonable amounts of XML in your search results. And of course when making replacements, it’ll be your responsibility not to mess up the XML and break the document.
“The first thing I tried [after upgrading to PowerGREP 5] was a find-and-replace within an MS Word document. It worked perfectly in a Hebrew right-to-left document! For me this is the most dramatic, long-awaited achievement, allowing, at last, a decent find-and-replace feature to replace [MS Word’s] nonsensical “wild card” built-in feature. Many thanks, again, for a fantastic, must-have product!”
— Motti Teicher
9 September 2016, Israel
|Searching through MS Word documents with PowerGREP|
“I just want to tell you that you have a great program there. It turned a job that could have taken hours into a few minutes. The Microsoft OneCare back up system creates ZIP files, hundreds of them. We use an external hard drive and OneCare backs up the files over our network. My daughter is a college student and her computer died and she’s been on the National Honor list for the past five years because of the meticulous notes she takes and saves in Word files. She needed all her notes for one of the topics for a final exam and by using PowerGREP we were able to search the backup drive and get her files immediately to load on another computer for her to continue her intensive studies.
— Paul Mayer
21 February 2008, Illinois, USA