clhare
03-19-2013, 07:22 AM
I have a template from Word 2003 that I am testing in Word 2010. I am getting an error (wrong number of arguments or invalid property assignment) when I run the macro that is supposed to delete a table row.
The code (from 2003) is as follows:
'Callback for g4b13 onAction
Sub DeleteRowAtCursorPosition()
' Select the row and delete it
Selection.SelectRow
Selection.Rows.Delete
' Collapse selection to an insertion point
Selection.Collapse Direction:=wdCollapseStart
End Sub
I tried re-recording the steps and get the same code, so I don't know why it won't work in my macro.
Cheryl
The code (from 2003) is as follows:
'Callback for g4b13 onAction
Sub DeleteRowAtCursorPosition()
' Select the row and delete it
Selection.SelectRow
Selection.Rows.Delete
' Collapse selection to an insertion point
Selection.Collapse Direction:=wdCollapseStart
End Sub
I tried re-recording the steps and get the same code, so I don't know why it won't work in my macro.
Cheryl