AutoSum Method Example

This example creates a 3x3 table in a new document and sums the numbers in the first column.

Set newDoc = Documents.Add 
Set myTable = newDoc.Tables.Add(Selection.Range, 3, 3)
With MyTable
    .Cell(1,1).Range.InsertAfter "10"
    .Cell(2,1).Range.InsertAfter "15"
    .Cell(3,1).AutoSum
End With

This example sums the numbers above or to the left of the cell that contains the insertion point.

Selection.Collapse Direction:=wdCollapseStart
If Selection.Information(wdWithInTable) = True Then
    Selection.Cells(1).AutoSum
Else
    MsgBox "The insertion point is not in a table."
End If