0

I have a simple VBA macro for word that works fine. I searched the libre forum and also tried to find any documentation regarding the libre object model, I was not able to find anything that would help. I need to loop through each line (in VBA ActiveDocument.Paragraphs) and then evaluate and modify the text there. Could someone provide an example how to iterate through the lines of text in libre office writer in a BASIC sub? 2. If possible, it would also be great is someone knew how to insert text at the end of the document similar to VBA:

ActiveDocument.Paragraphs.Add
ActiveDocument.Content.InsertAfter Text:=strEnd

1 Answer 1

2

For the subroutine for enumerating paragraphs (paragraphs, not lines!) see "7.16.3.What does it mean to enumerate text content?", and for adding text - in "7.6. Insert text" and "7.6.1. Insert new paragraph"

(When viewing listings in other chapters, pay attention to the repeated line of code oCursor.gotoEnd(false) )

Sign up to request clarification or add additional context in comments.

1 Comment

ok thanks. Will have a look!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.