Selection.Calculate Method

Word Developer Reference

Calculates a mathematical expression within a selection. Returns the result as a Single.

Syntax

expression.Calculate

expression   Required. A variable that represents a Selection object.

Example

This example calculates the selected mathematical expression and displays the result.

Visual Basic for Applications
  MsgBox "And the answer is... " & Selection.Calculate

See Also