Selection.Calculate Method (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .Calculate

expression Required. A variable that represents a Selection object.

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

MsgBox "And the answer is... " & Selection.Calculate