>Is there a single, one line command that puts all the Search parameters
>back to their default state? After doing a search, I always run things
[quoted text clipped - 10 lines]
>Thanks,
>Larry
No, there isn't any single "reset" command. Grab the subroutine
ClearFindAndReplaceParameters from
http://www.word.mvps.org/FAQs/MacrosVBA/ClearFind.htm, and call it
after using Selection.Find. See
http://www.word.mvps.org/FAQs/MacrosVBA/FlushFR.htm for an example of
its use.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Larry - 07 Jul 2005 02:16 GMT
I would be a built-in method:
Selection.Find.DefaultSettings :-)
> >Is there a single, one line command that puts all the Search parameters
> >back to their default state? After doing a search, I always run things
[quoted text clipped - 22 lines]
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
Larry - 07 Jul 2005 02:16 GMT
Hi Jay,
Yeah, of course, I've had that macro and run it in other macros for
years. I just wondered if there was a simple one-liner instead. :-)
There ought to be.
Larry
> >Is there a single, one line command that puts all the Search parameters
> >back to their default state? After doing a search, I always run things
[quoted text clipped - 22 lines]
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
Jay Freedman - 07 Jul 2005 04:27 GMT
Hi Larry,
I'd say it's a matter of little consequence. Once you have the
subroutine stashed in a global template, then clearing the Find object
*is* a one-liner, just the name of the ClearFindAndReplaceParameters
subroutine. The number of lines inside the subroutine is immaterial,
just as the number of lines of (probably C++) code needed to create a
built-in function in Word itself is immaterial.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
>Hi Jay,
>
[quoted text clipped - 32 lines]
>> Jay Freedman
>> Microsoft Word MVP FAQ: http://word.mvps.org