How to open a file in a reduced window every time

I just installed LO for the first time and I open files from File>Open… pulldown and they always open in full-screen mode rather than in the size I have the window set to for the other files I have open.

I’m sure there’s a setting somewhere that controls this, but I’ll be damned if I can find it. Thank you.

Your operating system is the Window controller. For me on Windows, the last window I closed before the program shut down is the first size to open. Sometimes the second-to-last window closed sets the size for the second window I open.

It is possible via macro, set your own coordinates in the line: oWindow.setPosSize(…) in the Sub openInDefinedWindow

Sub openInDefinedWindow 'choose a file and open it in the defined coordinates X/Y & width/height
	dim oDoc as object, sUrl$, oSize as new com.sun.star.awt.Size, oPosSize as new com.sun.star.awt.Rectangle
	sUrl=filePicker
	if sUrl="" then exit sub
	oDoc=StarDesktop.LoadComponentFromURL(sUrl, "_blank", 0, array()) 'open the file
	oWindow=oDoc.CurrentController.Frame.ContainerWindow
	oWindow.setPosSize(100, 100, 500 ,800, com.sun.star.awt.PosSize.POSSIZE) 'set parameters for opened window: X, Y (coordinates from left-top border in Desktop), width, height
End Sub

Function filePicker() as string 'open dialog for File Open
	on local error goto chyba
	dim oFileDlg, oFileAccess, oFiles, sFile$, sInitDir$
	oFileDlg=CreateUnoService("com.sun.star.ui.dialogs.FilePicker")
'	oFileDlg.AppendFilter("Writer (*.odt)", "*.odt") : oFileDlg.SetCurrentFilter("Writer (*.odt)") 'filters only for ODT files
	oFileAccess=CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
	sInitDir=convertToUrl(CreateUnoService("com.sun.star.util.PathSettings").Work) 'default directory from: Tools/ Options/ LibreOffice/ Paths -> My Documents
	if oFileAccess.Exists(sInitDir) then
		oFileDlg.SetDisplayDirectory(sInitDir)
	end if
	if oFileDlg.execute() then
		oFiles=oFileDlg.getFiles()
		if ubound(oFiles)>=0 then
			sFile=oFiles(0)
		end if
	end if
	filePicker=sFile
	exit function
chyba:
	msgbox("Error " & Err & chr(13) & Erl & chr(13) & Error)
End Function

Right. Good to know. That is an amazing bit of macro programming, and I think I’ll pass, at least for a while. Thanks for the response.

@crankyduke: this is no “standard” forum here. This Q&A site is driven by an engine interfacing a DB. You don’t flag a question as answered by patching its title. You click (once) on the grey checkmark at top left of relevant answer. Then the engine will flag the question as answered and this will be reflected on the home page and in the statistics.

Please do it.

If you consider the question doesn’t need to (shouldn’t, can’t) be improved with additional answers, you can also close it.