Using LibreOffice Macros basic, how do I put a string in a writer document as the full document?

How can I put a string in a writer document with the string as the full document?

I’m not clear on your question, but…

Sub Main()

	data = "New info"

	doc = ThisComponent
	
	doc.Text.String = data
	
End Sub

Thank you.