In the Replace With box, type the replacement text. To replace found text: Select the magnifying glass, and then select Replace. If ((GetAttr(dirPath) And vbDirectory) = vbDirectory) And (dirName ".") And (dirName ".") ThenįileName = Dir$(dirName & "*.doc", vbDirectory)įor i = LBound(findTextsWild) To maxIndex In the upper-right corner of the document, in the search box, type the word or phrase that you want to find, and Word will highlight all instances of the word or phrase throughout the document. ReplaceTexts = Array("DirX Access", "Policy Repository", "User Repository", "Servlet", "Servlet-Filter", "SAML assertion", "DirX Access Server", "DirX Access Manager", "Deployment Manager", "Policy Manager", "Client SDK", "^p", "^p")ĭirName = Dir$(rootPath & "*", vbDirectory)
Performed second.ĭim findTexts() As Variant, replaceTexts() As VariantįindTexts = Array("DirX Access", "Policy Repository", "User Repository", "Servlet", "servletfilter", "SAML assertion", "DirX Access Server", "DirX Access Manager", "Deployment Manager", "Policy Manager", "Client SDK", "^p ", " ^p") ' Find and replace text for normal case insensitive replacement. Performed first.ĭim findTextsWild() As Variant, replaceTextsWild() As VariantįindTextsWild = Array("", "onfigurationepository", "ervlet[- = Array(" ", "Configuration/Policy Repository", "Servlet-Filter") ' Find and replace text for wildcard replacement.
' Root under which all manuals are stored May be you will find it usefull :-) Sub GlobalTextReplacement()
The standard Windows file open dialog will show up. Topic then an assumption of you being a novice user is more than fair, so
The latter option is more for the power users. process all files in a directory of your choice.
This topic presents the detailed step-by-step instructions how to update text (which is usually referred to as "search and replace") in many Microsoft Word files. How to Change Text in Multiple Word Files