Insert file using API

I’m porting a document generator, which needs to add a set of HTML files into a new document.
Environment is Windows10, Visual Studio, .NET.
I have made the simple examples work ,but I can’t find a specific example which shows how to add a file. Do I need a different type of Cursor object ?

In what sense do you try to insert a file. Is it about content taken from the single files or do you want to generate a master document (.odm)?
Concerning TextCursor there are no (explicitly) different types but the cursor “knows” by which text it was created. The Text object, however may show different behavior dependig on what object is hosting it. Text of a shape e.g. is very different from the body text of a Writer document. Concerning Text of TextFrame and TextTable cells there should not be much of a difference. However: If you use a TextCursor in the context of text.insertTextContent(), it should be created by the same text object to which the insertion is intended.

The doc generator already creates a set of HTML files. At the moment, they get added in Word using the Word API, and I’m just trying to replicate the same function with ODM documents.Basically, all I need is the function which in the user interface is Insert / Text from File, which works just fine.
Doing the function in the UI, whilst recording it as a Macro doesn’t see to produce anything useful.