Cursor Position or insertion location

Discuss the word processor
Post Reply
robertlummerding
Posts: 8
Joined: Mon Jun 21, 2021 11:50 pm

Cursor Position or insertion location

Post by robertlummerding »

How do I find out where my cursor is on a page?
example:
I want to start entering text 2.3" down from the top of the page and 3.4" in from the left hand side of the page. (or there about)
I can hit the enter key until I am about 2.3" down - How do I know where I am at as I hit the enter key
Then I can hit the TAB Key to move over until I am about 3.4" in from the left hand side (How do I know where I am in the document?)

All the other word processors provide an indicator somewhere on the screen to show where you are located in the document.
How do I set this up?

Thanks
Robert
A newbie!!!

Ver 4.1.10 on Windows 10
OpenOffice 4.1.10
Windows 10 Pro
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: Cursor Position or insertion location

Post by JeJe »

Format menu/page and set the margins for the page
Format menu/paragraph to set the indents and apacing for the paragraph
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
robertlummerding
Posts: 8
Joined: Mon Jun 21, 2021 11:50 pm

Re: Cursor Position or insertion location

Post by robertlummerding »

Yes I can do that but what if there is more text above the location I stated in my origial question and also other text to the left of the 3.4" from the left edge of the page?
Robert
OpenOffice 4.1.10
Windows 10 Pro
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: Cursor Position or insertion location

Post by JeJe »

The rulers will show you.

This macro will give the cursor position in a message box (from the start of the document vertically and (Edit:) start of the paragraph horizontally).

Code: Select all

Sub cursorPosition
ps= thiscomponent.currentcontroller.viewcursor.position
msgbox "x: " & ps.x/100 & " mm" & chr(10) & "y: " &  ps.y/100 & " mm"
End Sub
Last edited by JeJe on Tue Jun 22, 2021 1:10 pm, edited 1 time in total.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Cursor Position or insertion location

Post by RoryOF »

You should also turn on /View /Non printing characters (a toggle command) to allow you see the structure of what you typed.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Cursor Position or insertion location

Post by Lupp »

Any text inserted into the textflow of the text body of the document may change its vertical position as soon as there is something edited above it. You can't enter text with a specific distance from the upper edge of any page therefore. Textflow is one of the fundamental features in ordinary text processing. There is software (like scribus) for documents needing a specific page-layout.

In a flow-text editor only the distance to any text above can be specified. If you need such a distance precisely adjusted, you should define a paragrpah style for it with the respective "space above".

((I regard it a very bad idea, but it actually was implemented, and I mention the "Direct Cursor" feature of LibreOffice Writer V6.0 or higher.))

If you definitely want to place a text in a position fixed relative to margins or page edges, you need to insert and position a TextFrame (and to anchor it toi the page). Not recommended for beginners.

PS @"robertlummerding"
You claim to be a newbie, but tell us what "All the other word processors" provide.
Who might list what "all the other" is supposed to be?
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: Cursor Position or insertion location

Post by JeJe »

Instead of having multiple tab characters you can set a custom tab stop for positioning horizontally (format menu/Paragraph/Tabs or customize the tabs for the paragraph style).
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
robertlummerding
Posts: 8
Joined: Mon Jun 21, 2021 11:50 pm

Re: Cursor Position or insertion location

Post by robertlummerding »

Thank-you all for your help.
I do realize that I can't have the "exact" position but was trying to get my idea across.
Using the rulers on the side is a bit ackward and hard to read at times, but it will provide some assistance.
I have been using WordPerfect for over 20 years on an XP computer. I finally had to upgrade to Windows 10.
Now I am learning a number of "new" programs. I have always avoided Microsoft software in the past.
WordPerfect showed what the position the cursor was on in relation to the page at the bottom of the screen at all times. I did not realize how much I used that feature over the years until now.

JeJe gave me a macro to run.
How do I do this?

Next Where my initial question came from:
I need to type a page to put into a window envelope where the return address is approx .893" down from the top of the page and 1" in from the left side
The sending address is 2.25" from the top of the page and 1.5" in from the left hand side of the page.

Very simple but in a learning curve.

Thanks,
Robert
OpenOffice 4.1.10
Windows 10 Pro
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: Cursor Position or insertion location

Post by JeJe »

The attached document has the macro and a button in a custom toolbar to run it.

It also has 2 text frames anchored to the page which is possibly the best way to do your envelope.
Attachments
test.odt
(11.39 KiB) Downloaded 144 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Cursor Position or insertion location

Post by Lupp »

Just an example of a letter template made for letters to be sent in (German) window envelopes "DIN Lang".
Take it as an example how elements needing to be fixed in a specific position can be handled in Writer.
Attachments
letterTemplate.ott
(20 KiB) Downloaded 150 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
robertlummerding
Posts: 8
Joined: Mon Jun 21, 2021 11:50 pm

Re: Cursor Position or insertion location

Post by robertlummerding »

Thanks so much!
I will study these macros and modify for my use.
Robert
OpenOffice 4.1.10
Windows 10 Pro
Post Reply