I have a multi-slide presentation which I need to have a macro starts the presentation, and then select various slides based on some data coming in on a serial port. I've got the serial port working (which I thought was going to be the hardest part), now I just need to do the slide selection.
After some attempts & Googling I've come up with this, but it only works before the presentation is started. I know I'm missing something quite fundamental but can't quite find it
Can somebody put me on the right track?
Thanks!
Code: Select all
dim odoc as object
dim odrawpage as object
odoc = ThisComponent
' oDoc.Presentation.Start() ' doesn't work when this line uncommented
n = 3 ' for example
oDrawPage = oDoc.getDrawPages().getByIndex(n)
odoc.CurrentController.setCurrentPage(odrawpage)