Being simple as I am I just thought it is Basic program operating on a text document - so the "only" problems are compability of program and document. From your answer I take it nobody played (me excluded

) with your macro in LO yet.
I added:
Option VBASupport 1
Option Compatible
I get:
BASIC syntax error.
Variable CharFonts already defined.
which is Basic incompatibility probably.
If time allows, your permission presumed, I'll play some more...