Open Libreoffice Calc in FullScreen

I need to open the File (“01_MODELO_PRESCRICAO_UEM”) in fullscreen…

Who can help me ???

I have this macro, but don’t working…

Sub AbreTelaInteira
    oSheet = ThisComponent.Sheets.getByName("01_MODELO_PRESCRICAO_UEM")
    oController = ThisComponent.CurrentController

    With oController
        .setActiveSheet(oSheet)
        .ColumnRowHeaders = False
        .SheetTabs = False
        .Frame.LayoutManager.HideCurrentUI = True
    End With
End Sub

Edit to place code inside a code block

Do you really mean fullscreen, or do you mean maximised?

fullscreen…
i don’t want to show menus… only the cells of the sheet…

don’t work… i need a new code to do this… can someone help me ?

You could add the following in your With block.

.HasHorizontalScrollBar = False
.HasVerticalScrollBar = False
.Frame.ContainerWindow.IsMaximized = True

This still leaves the window title bar and the windows task bar.

Edit to add example calc document.
Untitled 34.ods

This is as close to full screen as I could get using a macro without calling windows user32.dll that will work only on 32 bit version of LibreOffice and only on windows.

Please post a screenshot or describe in more detail what doesn’t work.

On my Windows 8.1 LibreOffice 5.2.2.2, 64 bit it looks like this:

I’ll test at night… but i think that won’t work because My initial code didn’t work…

For me your original code was turning off the toolbars, menus, column and row headers. It did not change window to maximised or turn off the scroll bars. I’m using LO 5.2.1.2 on Windows8.1. What was not working for you?

I’ll test the macro in a few minutes

don’t work…

can you help me ???

i need a new code to do this…

I found a code that worked perfectly…

sub startFullScreen()

   dim document   as object
   dim dispatcher as object
         
   document   = ThisComponent.CurrentController.Frame
   dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

   dim args(0) as new com.sun.star.beans.PropertyValue
   args(0).Name = "FullScreen"
   args(0).Value = True

   dispatcher.executeDispatch(document, ".uno:FullScreen", "", 0, args())

end sub

I edited your post to correct the code block format. I didn’t consider the option of recording a macro from the menu item for full screen.