With the advice I received in fine tuning a goto bookmark libreoffice macro and here too, I had successfully created a macro that in LibreWriter went to the last point where the cursor was at the end.
After upgrading from Kyubuntu 17.04 to Kubuntu 17.10, with the new version of LibreOffice I get an error message, not in Writer, not in Calc, but in Base:
BASIC runtime error. Property or method not found: supportsService
and is highlighted the line If NOT thisComponent.supportsService (" com.sun.star.text.TextDocument ") Then
. Apparently supportsService
is not recognized in LibreBase.
I refer to the whole macro:
sub vai_qui
If NOT ThisComponent.supportsService ("com.sun.star.text.TextDocument") Then
Exit Sub
End If
oBookmarks = ThisComponent.getBookmarks ()
If NOT oBookmarks.hasByName ("here") Then
Exit Sub
End If
ViewCursor = ThisComponent.CurrentController.getviewCursor ()
Bookmark = ThisComponent.Bookmarks.getByName ("here") .Anchor
ViewCursor.gotorange (Bookmark, False)
ViewCursor = ThisComponent.CurrentController.getviewCursor ()
Bookmark = ThisComponent.Bookmarks.getByName ("here") .Anchor
ViewCursor.gotorange (Bookmark, False)
end sub