The information in this article applies to:
SYMPTOMSThe logical string operation example on page 35 of "Using WordBasic", which compares the values of "c" and "D", does not yield the correct result. MORE INFORMATION
According to "Using WordBasic," the evaluation of (n = "c" > "D") produces
a "TRUE" (non-zero) result because "c" occurs after "D" in the ANSI code
set. When you perform this operation in a WordBasic macro, the macro
incorrectly reports a "FALSE" (zero) result.
WORKAROUNDUse the ASC macro command to return the ANSI code for the text strings to be compared. The following macro produces correct comparison results: When you run the macro, the correct value (TRUE) appears on the status
bar.
Steps to Reproduce ProblemThe following macro incorrectly reports a "FALSE" (zero) result instead of the correct result of "-1" (TRUE):
In addition, if you change the logical operator from ">" to "<", as shown
in the example below, the macro also yields incorrect results ("-1" or
"TRUE").
STATUSMicrosoft has confirmed this to be a problem in the versions of Microsoft Word listed above. This problem was corrected in Word 97 for Windows and Word 98 Macintosh Edition. REFERENCES"Using WordBasic," by WexTech Systems and Microsoft, page 35 Additional query words: winword2
Keywords : kbmacro kbdtacode kbmacroexample winword macword word6 word7 word95 |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |