Tommy,
Actually I haven't gotten around to working on the reverse-sort order for the call history table. I just wrote this generic function to insert a row at the bottom of a table. I figured we could add a third arg to tell it whether to add the row at the top or bottom. Something like:
[vba]
Function InsertTableRow(IntTableNum As Integer, Optional lRows As Long, Optional intPos as Integer) As Boolean
InsertTableRows = False
If IsMissing(lRows) and IsMissing(intPos) Then
msgbox "Missing parameter in InsertTableRow. Must use either lRows or
intPos."
Exit Function
Else If !IsMissing(lRows) and !IsMissing(inPos) Then
msgbox "Too many parameters in InsertTableRow. You can only use lRow or intPost, but not both."
Exit Function
End If
On Error Goto errhandler
If intPos = TOP 'TOP defined as CONST TOP = 1 Default is Const BOTTOM = 0
ActiveDocument.Tables(IntTableNum).Rows(2).Select 'not really using lRows in this case
Selection.InsertRowsAbove
Else
ActiveDocument.Tables(IntTableNum).Rows(lRows).Select
Selection.InsertRowsBelow
End if
InsertTableRow = True
Exit Function
errhandler:
MsgBox Err.Number & ": " & Err.Description
End Function
[/vba]
So we send the tablenum and then either the lRow or IntPos. Not sure about how to best handle any errors.
Cheers,
James