How to change the default zoom in LibreOffice Writer so that when I open a document, it is automatically 125%. I can do it with Word.

When I receive an odt file and open it, I want to see it at 125% Zoom, but they almost always over 180%.
Can I set a default view like I can with Word?

What OS?

Make sure the option “Load user-specific settings with the document” is checked in Tools > Options > Load/Save > General.

Sometimes it’s weird. Try to keep only one document active, then set the zoom level and close LO with the little cross top right for the document only, so that it then displays the start center with the recent document files. Then close LO.

Try to reopen a document. And see if the zoom remains.

user-specific is set. Solution doesn’t help. I want a default zoom set for documents I open the first time.

Please change your answer to a comment (“more” button right of the “Comments” line of your answer), this is not a forum and the answers are for solutions only.

What documents do you talk about? New documents created with LO? In this case, create a default template with the required zoom level.

I have the same issue. After I updated LibreOffice, it now always opens documents at way too large of a zoom factor. How can the default zoom for all documents be set to a specific percentage?

One of the posible workarouds:

Write a macro what will set the Zoom value to the desired value, and assign it to an Event related to the opening procedure.

How does one do that?

I suppose it you must start with searching on the internet…

(You can Record a macro, or you can WRITE a macro based on the API functions. Then you need use the Customize feature to assign the macro to an Event.)

Here is a RECORDED example macro:

sub Zoom125
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Zoom.Value"
args1(0).Value = 125
args1(1).Name = "Zoom.ValueSet"
args1(1).Value = 28703
args1(2).Name = "Zoom.Type"
args1(2).Value = 0

dispatcher.executeDispatch(document, ".uno:Zoom", "", 0, args1())

end sub

And here is a WRITTEN one:

https://forum.openoffice.org/en/forum/viewtopic.php?t=30687

It’s not very difficult. Launch LibreOffice and choose this item from the menu
image
In the window that appears, select the My Macros section on the left, and in it select the Standard library. Click New
image
The BASIC editor will open. Paste code like this there:

Sub setMyFavoriteZoom(Optional oEvent As Variant)
Const MY_FAVORITE_ZOOM = 125
Dim oSource As Variant
Dim oViewSettings As Variant
	If IsMissing(oEvent) Then 
		oSource = ThisComponent
	Else 
		oSource = oEvent.Source
	EndIf 
	If oSource.supportsService("com.sun.star.text.TextDocument") Then
		oViewSettings = oSource.getCurrentController().getViewSettings()
		If oViewSettings.ZoomValue <> MY_FAVORITE_ZOOM Then oViewSettings.ZoomValue = MY_FAVORITE_ZOOM
	EndIf 
End Sub

Now choose Tools - Customize - Events tab.
Make sure the Save in box at the bottom is set to LibreOffice
Select the event named “View Created” and click the Macro button


Assign the macro you just recorded as a handler for this event.
Using the same Tools - Customize command on the Context Menu tab, you can add a call to this macro

Now with two clicks you can set your favorite scale while editing a document
image

And/or you could assign a keyboard shortcut if you prefer to use the keyboard, and save mouse clicks :slight_smile:

1 Like