Create a footnote using macros in Writer

Hello.
I have tried:

	foot = oDoc.createInstance ( "com.sun.star.text.Footnote" )
	oTextContent = oDoc.createInstance("com.sun.star.text.XTextContent" )
        oTextContent.setString(footnoteText)  ' Set the footnote text

But doesn’t work.

The doc is very confusing, it shows some Java code but i am using vbasic.

Thanks.

What is “vbasic”?
Also, please mention a link to the Java documentation - it helps answering.

Basically, your code lacks insertion of the created object.