You might find a whole chick in a chicken egg but you can't find a whole chicken egg in a chicken egg. You can Find things "in" a Search Range, but you can't Find "the" Search RangeĪnother way of putting that is to use an analogy.
Using either method, you can ensure unwanted previously defined settings will not adversely affect your VBA. He discovered that routine needed a range object (versus simply the selection) to properly reset the listed parameters. Note: Special thanks to Christian Wolkerdorfer for identifying and resolving a glitch in the ResetFRParameters routing. 'Or as an alternate, I could have used the ClearFormatting method. 'Note key (problem) property in this case is explicitly set.
Microsoft word find and replace with lowercase how to#
See: Installing Macros for instructions on how to set up and use the macros provided in this Microsoft Word Help & Microsoft Word Tips page.Ģ. 'Returns true if the defined text was found.ġ. Note: For the demonstrations that follow, it will be best if you show the non-printing paragraph marks in your document.
Find property is limited to a single targeted storyRange. Unlike the global document scope of any find/replace operation using the built-in dialog, the scope of a basic VBA procedure using the.Beware Continuous and Prematurely Broken Loops.The search range is "always" a dynamic range, regardless of how it is defined.You can find things "in" the defined search range, but you can't find the defined search range.Any setting (property) that you define in the built-in Find and Replace dialog is sticky in the current Word version and will influence VBA.Find property, and when you do you might be spared the hours of frustration that I've experienced Fickle Key Concepts\Behaviors of the. These concepts are key to understanding and using the. Find property that have tripped me up in the past. In this tips page I want to try to demonstrate a few fickle concepts\behaviors of the. I'll only say that if you are impressed with what you can do with the Find and Replace dialog in the user interface, then you won't be disappointed with what you can achieve through VBA. I am not even going to try to demonstrate or even enumerate everything that you can do with it. It is capable of some pretty amazing feats, but with that capability comes complexity and a degree of fickleness that can take one to the brink of madness. Of all the VBA I've ever used, I've been most confounded and frustrated with the. Find property or if, like me, you've ever pulled out clumps of hair and scalp in frustration trying to use it, then this tips page might help. If you are new to Word VBA and trying to get your head around how to use the.