The information in this article applies to:
SUMMARYIf you use the caret character (^) to perform exponentiation in a Microsoft Word for Windows macro, the following error message is generated:
MORE INFORMATION
Page 31 of the "Using WordBasic" manual, written by WexTech Systems
and Microsoft, documents exponentiation in mathematical formulas using
the caret character within a WordBasic macro.
If you run a macro that contains this line, the WordBasic syntax error
occurs. There is no supported mathematical operator in WordBASIC for
exponential calculations.
For information , please see the following article in the Microsoft Knowledge Base: Q74050 Supported Mathematical Operators in WordBasic STATUSThis problem was corrected in Word 97. WORKAROUNDTo perform a mathematical calculation that involves exponents, you can use the ToolsCalculate() function. This functions returns a value to a numeric variable. For example, to find the value of two to the eighth power (2^8), use the following WordBASIC statement: x=ToolsCalculate("2^8")
The ToolsCalculate method does not accept variable names such as power and
base. For example, the following macro results in a WordBasic bad parameter
error:
The following macro example performs the sample calculation using
variables:
REFERENCES
"Using WordBasic," by WexTech Systems and Microsoft, page 31
Additional query words: 2.0 winword word6 7.0 word95 word7 docerr doc err exponent exponentiate power calculate mdk winword2 6.0 ToolsCalculate
Keywords : |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |