Assigning Hotkey to Macro

Is there any way to record a macro and give it a hotkey in Writer? I recorded one, and couldn’t figure out a way to do so. I’m trying to make it easy to accept tracked changes. As is, it requires going to the menu, pulling it down, and navigating through to click on Accept Change in the menu. That’s clumsy and grossly inefficient if you have a long document with a lot of suggested changes. But, if I can’t assign a key to the macro for accepting one, it’s still the same process of going through the drop downs.

Tools - Customize - Keyboard - (choose the Scope: Calc/LibreOffice; the hotkey will be available in one Application only or in all of the Applications) - Choose a free and available (unused) hotkey - Category - Application Macros - Browse and add the desired Macro to it.

Why not use the Manage Changes pane in the sidebar?
Or click View > Toolbars > Track Changes so you have that toolbar open when reviewing changes?

Zizi64 That doesn’t seem to work. I tried it several times with no success. It was only when I reversed the process that it worked. I chose my macro FIRST and then assigned a keyboard shortcut to it.
There is a caveat here as well. If you are going to share the file then you must use an unassigned shortcut otherwise, when you share the file the macro will not work on the other person’s computer because the shortcut you have used will mean something else for that computer

You can save a keyboard shortcut directly into a document.
A keyboard shortcut saved in a document takes precedence over Writer and LibreOffice keyboard shortcuts.

I’ve tried assigning the key both ways–select key combo then macro function, and select macro function then key combo–and neither is working. The Customize dialog shows the new mapping when I bring it up, but typing the key combo does nothing. I set it up within Writer, specified the mapping target as Writer, and am trying to use it in Writer (in the same document, in fact). Any idea what could be wrong?

You didn’t specify which shortcut you chose. Be aware that some are used by the operating system, thus won’t work in an application.

Great–that was the problem. I assigned it to Ctrl+Shift L, which appeared to be available because there was nothing assigned to it in LibreOffice. I didn’t know there is a Windows function assigned to that key combination. Thanks for the help.