Calc in full screen

Solved
Mots croisés Posted messages 3059 Registration date   Status Member Last intervention   -  
Mots croisés Posted messages 3059 Registration date   Status Member Last intervention   -
Hello,

I created a table with Calc.
I would like it to open in full screen (no toolbars, no formula bar, no row and column headers) upon opening.

I imagine that, like in Excel, I need to create a piece of code in VBA.
Can someone please write this code for me?
And since I don't understand much about Calc macros, if you could guide me on where to paste this code.

Thank you

Configuration: Windows / Firefox 44.0

--
Without Helpers, our computer wandering would be endless - Crossword puzzles.

1 answer

  1. yclik Posted messages 3874 Registration date   Status Member Last intervention   1 609
     
    Hello
    To open in full screen, you need a macro triggered on the document event
    1 open macro editor
    ALT+F11
    select the workbook in the left panel (+)
    + Standard
    Button "New"
    Module 1 OK
    paste the macro below under Main (without main and end sub of the copied macro)
    Sub Main 
    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(0) as new com.sun.star.beans.PropertyValue
    args1(0).Name = "FullScreen"
    args1(0).Value = true

    dispatcher.executeDispatch(document, ".uno:FullScreen", "", 0, args1())
    End sub

    Save and close the macro editor

    2 Trigger on event
    In the workbook
    Tools>customize...
    Tab "Event" select "Open document"
    Under Assign button "Macro"
    select the module of the current workbook (like in 1)
    select the macro and button "OK"
    In the events tab, at the bottom, save in the current document.
    OK
    Save the document
    test the macro
    Tools>macro>run a macro
    select the module of the current workbook (like in 1)
    select the macro and button "OK"

    the workbook is in full screen, to exit press Escape or Esc

    Close the document

    Note the macro was created with the macro recorder
    Tools>macro>record a macro
    Perform the intended operations
    Button "Finish recording "
    + Standard
    Save
    1
    1. Mots croisés Posted messages 3059 Registration date   Status Member Last intervention   113
       
      Hello Yclick

      I hadn't noticed that I hadn't followed up on this post.

      It works.

      Thank you, have a nice day.
      0