String to string variable-how to get/libreoffice

Hello!
I have such a code:

Sub k 
    oParEnum = ThisComponent.getText.createEnumeration 
    Do While oParEnum.hasMoreElements() 
        oPar = oParEnum.nextElement()  
        print oPar.getString
    Loop 
End Sub

It writes the text in writer line by line in a msgbox.
What I want to achieve is to get each line in a particular variable with particular name, so that I can write it alone when I want later in program.

Please, any advices and links would be of a great help!

MANY THANKS IN ADVANCE!!!

P.S. iF i have:

twinkle twinke
little star
How I
wonder
what u
are

I want to get:

a$="twinkle twinkle"
b$="little star"
c$="How I"
d$="wonder"
e$="what u"
f$="are"

P.s. 2 Please, how do I get lines separated in these posts?
Many thanks!!!

MANY THANKS IN ADVANCE- I am not able to google any cute advices in the net at the moment!
AND YOU ARE ALREADY NOT ABLE TO EDIT YOUR POSTS PROPERLY, NEXT TIME I DELETE UNREADEBLE POST INSTEAD OF EDITING FOR DUMP --- KAROLUS

Hello!
Was practising right now:
“enter code here” is what I have to click for each ROW ,otherwise it does not go!
I don’t know for other computors, but that is definitely what I have to use at the moment!
Anyway, at least the problem is solved!

I mean, just the problem with writing the code in the post! Not the problem I asked about:(

Thanks, Karolus!

Please, how do I get variables a, b, c, d, e from text writen in writer when I use sub k?
Many thanks!!!
When I use sub k, I get each paragraph of the text on msgbox. When I click ok, I get next paragraph in the msbbox.
But, now I want each paragraph to be a string, each string having its name (a,b,c,…) so that I can mange these srings further!
Please, would be extremely gratefull for each advise!
Many thanks!!!