Hi William,
I am not an expert in Word oleobject, but looks like the syntax is wrong.
First of all, Microsoft doc
https://docs.microsoft.com/en-us/office/vba/api/word.selection.insertrows
says "If the selection isn't in a table, an error occurs.". Your code doesn't seem to be aware whether you are in a Word table or not.
I imagine you must first check if you have a table with something like lo_mainp.ActiveDocument.Tables.Count (please refer to Word documentation), then select the table in question, and finally lo_mainp.ActiveDocument.Selection.InsertRows( 1).
Btw, whenever I am unsure about Excel/Word oleobject syntax, I register a Macro and then "copy&paste" the syntax to PowerBuilder
https://support.microsoft.com/en-us/office/create-or-run-a-macro-c6b99036-905c-49a6-818a-dfb98b7c3c9c
Lazy approach but saves me from syntax headache.
Hope that helps.
Best,
.m