S
StevenM
To: Aleksander,
Of course, it depends on what type of numbers your table has, but ...
Sub ReadNumbersFromTable()
Dim nRow As Long
Dim nCol As Long
Dim sStr As String
Dim sgNum As Single
For nRow = 1 To ActiveDocument.Tables(1).Rows.Count
For nCol = 1 To ActiveDocument.Tables(1).Rows(nRow).Cells.Count
sStr = ActiveDocument.Tables(1).Cell(nRow, nCol).Range.Text
sStr = Left(sStr, Len(sStr) - 2)
If IsNumeric(sStr) Then
sgNum = CSng(sStr)
MsgBox sgNum
End If
Next nCol
Next nRow
End Sub
Steven Craig Miller
Of course, it depends on what type of numbers your table has, but ...
Sub ReadNumbersFromTable()
Dim nRow As Long
Dim nCol As Long
Dim sStr As String
Dim sgNum As Single
For nRow = 1 To ActiveDocument.Tables(1).Rows.Count
For nCol = 1 To ActiveDocument.Tables(1).Rows(nRow).Cells.Count
sStr = ActiveDocument.Tables(1).Cell(nRow, nCol).Range.Text
sStr = Left(sStr, Len(sStr) - 2)
If IsNumeric(sStr) Then
sgNum = CSng(sStr)
MsgBox sgNum
End If
Next nCol
Next nRow
End Sub
Steven Craig Miller