Ask Your Question
0

How to create a macro that will mark current location, allow movement to another page, then return to current location.

asked 2019-06-15 17:50:26 +0200

daniels gravatar image

Is there a way to create a macro in write that will allow me to mark a current location, move to another page to look something up, and then return to the previously marked location in the document.

edit retag flag offensive close merge delete

Comments

Clarify where you are trying to write - Writer, Calc.... ?

arindam gravatar imagearindam ( 2019-06-17 12:31:20 +0200 )edit

Sorry, I need this for Writer.

daniels gravatar imagedaniels ( 2019-06-17 15:52:47 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-06-18 11:09:31 +0200

Try this - assuming you have a bookmark named "Bookmark 1" from Insert Menu -> Bookmark

Sub writer_bookmark()

ViewCursor = ThisComponent.CurrentController.getviewCursor()
Bookmark = ThisComponent.Bookmarks.getByName("Bookmark 1").Anchor
ViewCursor.gotorange(Bookmark, False)

End Sub
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-15 17:50:26 +0200

Seen: 30 times

Last updated: Jun 18