[Solved] macro to count lines in a writer doc (report)

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
gkissinger
Posts: 19
Joined: Thu Apr 25, 2013 1:08 am
Location: Arizona, USA

[Solved] macro to count lines in a writer doc (report)

Post by gkissinger »

I write my reports using OO BASIC. I need a way to get the line number of the page I'm on so I can decide to skip to a new page or not.

I've spent a lot of time going through posts in various forums, but haven't found anything to help - I also used XRAY on the document, view cursor and text cursor. I was
hoping to find a simple property called "Current Line" or "Line Count" but no luck....
Last edited by RoryOF on Tue Sep 23, 2014 7:39 pm, edited 2 times in total.
Reason: Added green tick. [RoryOF, Moderator]
Win 7 - OpenOffice 4.1.1
FJCC
Moderator
Posts: 9577
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: macro to count lines in a writer doc (report)

Post by FJCC »

I found the property CurrentController.LineCount
Capture.JPG
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
gkissinger
Posts: 19
Joined: Thu Apr 25, 2013 1:08 am
Location: Arizona, USA

Re: SOLVED! macro to count lines in a writer doc (report)

Post by gkissinger »

Thanks! Just what I needed!
Win 7 - OpenOffice 4.1.1
Post Reply