Remember last slide

Hello.

when I open my presentation file, I need Impress to automatically open the last page of my slides.
I mean Impress can remember which page was the last slide I saw.

Try the attached presentation which contains two little macros.
last_page.odp (16.0 KB)

1 Like

Thanks, but your sample file has 12 slides and starts from slide 7!
Also I can’t see slides before slide 7 and after slide 7!

–

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.2~rc1-0ubuntu0.22.04.1~lo1
Calc: threaded

I open the file, move to page 5, close the file, open the file, and the macro navigates to page 5.
I start the presentation at current page 5 [Shift+F5], move forward to page 10, cancel the presentation, close the file, open the file, and the macro navigates to page 10.

I tested again. You are right.

Thank you.

each slide looks like each other … except page-number

1 Like

OK. In order to transfer this solution to other presentations, you need to do 3 things.

  1. Tools>Macros>Organize>Basic… and create a new module somewhere under “My Macros” and copy my code into your module.
    1b) If you want to embed the macro in your document, do the same with a module that is embedded in your doument instead of “My Macros”.
  2. Bind the macros to the correct events. Open my document and have a look at Tools>Customize… tab “Events”
  3. menu:File>Properties… tab “Custom Properties” and add a new property named “LastPage”, type “Number” with some number.
1 Like