WD: Can't Search All Using Macro with Find or Replace CommandLast reviewed: February 5, 1998Article ID: Q140867 |
The information in this article applies to:
SYMPTOMSWhen you create a WordBasic macro to find or replace text (the equivalent of clicking Find or Replace on the Edit menu), you cannot specify a Direction argument to search the entire document.
CAUSEThe Direction argument only allows you to search up, search down, or wrap through the body of a document. This functionality is different from the Find and Replace dialog boxes, available on the Edit menu. These dialog boxes allow you to find or replace text throughout the entire document, including headers, footers, and text boxes.
WORKAROUNDThe follow sample macro opens the Find dialog box so that you can manually select All, under Search. WARNING: ANY USE BY YOU OF THE MACRO CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Sub MAIN Dim Dlg as EditFind GetCurValues dlg Dlg.Find = "SearchString" n = Dialog Dlg End Sub STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
REFERENCES"Microsoft Word Developer's Kit," (part number WB51159-1093), version 6.0, pages 390-393.
|
Additional query words: word basic wordbasic
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |