I have an autoopen macro to go on a specif bookmark (“here”) created whenever I save a writer document.
I wonder if it could be possible to disable this macro if the odt file is open from another odt file (and not from Dolphin, i.g.). So I could open the target file at the point I want (a bookmark different from “here”).
Thanks
EDIT
-
autoopen: I mean that macro runs automatically when a odt is opened
-
this is the macro (stored, so to say, not in a file, but in LibreOffice: affecting all odt files)
sub vai_qui
If ThisComponent.supportsService(“com.sun.star.text.TextDocument”) Then
oBookmarks = ThisComponent.getBookmarks()
If NOT oBookmarks.hasByName(“qui”) Then
Exit Sub
End IfViewCursor = ThisComponent.CurrentController.getviewCursor()
Bookmark = ThisComponent.Bookmarks.getByName(“qui”).Anchor
ViewCursor.gotorange(Bookmark, False)ViewCursor = ThisComponent.CurrentController.getviewCursor()
Bookmark = ThisComponent.Bookmarks.getByName(“qui”).Anchor
ViewCursor.gotorange(Bookmark, False)else
Exit Sub
End If
end sub -
I’d like add a code, if possible, to disable this macro (in the target-document) if the new document is open (not from a specific file, but) from inside LibreOffice (/LibreWriter) and not from “outside” (i.g. Dolphin).
Thank you